git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@15 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-01-10 22:53:34 +00:00
parent c535710e13
commit e30640e43d

View File

@@ -280,7 +280,11 @@ class SmartcardOS(object): # {{{
def notImplemented(*argz, **args):
raise SwError(SW["ERR_INSNOTSUPPORTED"])
try:
c = C_APDU(msg)
except ValueError, e:
print e
return self.formatResult(0, 0, "", SW["ERR_INCORRECTPARAMETERS"])
#Handle Class Byte{{{
class_byte = c.cla
@@ -429,7 +433,12 @@ class CryptoflexOS(SmartcardOS): # {{{
def notImplemented(*argz, **args):
raise SwError(SW["ERR_INSNOTSUPPORTED"])
try:
c = C_APDU(msg)
except ValueError, e:
print e
return self.formatResult(0, 0, "", SW["ERR_INCORRECTPARAMETERS"])
try:
sw, result = self.ins2handler.get(c.ins, notImplemented)(c.p1, c.p2, c.data)
#print type(result)