raise a SW error on failed decryption
This commit is contained in:
@@ -337,7 +337,10 @@ class SAM(object):
|
|||||||
Parse a command APDU protected by Secure Messaging and return the
|
Parse a command APDU protected by Secure Messaging and return the
|
||||||
unprotected command APDU
|
unprotected command APDU
|
||||||
"""
|
"""
|
||||||
return self.current_SE.parse_SM_CAPDU(CAPDU, header_authentication)
|
try:
|
||||||
|
return self.current_SE.parse_SM_CAPDU(CAPDU, header_authentication)
|
||||||
|
except:
|
||||||
|
raise SwError(SW["ERR_SECMESSOBJECTSINCORRECT"])
|
||||||
|
|
||||||
def protect_result(self, sw, unprotected_result):
|
def protect_result(self, sw, unprotected_result):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user