fixed parsing of MSE:SET AT for nPA in AusweisApp2

This commit is contained in:
Frank Morgner
2014-12-02 09:00:47 +01:00
parent cea6a1d8f5
commit 9d7965d73b

View File

@@ -70,7 +70,7 @@ class ControlReferenceTemplate:
:param config: a TLV string containing the configuration for the CRT.
"""
error = False
structure = unpack(config)
for tlv in structure:
tag, length, value = tlv
@@ -83,8 +83,11 @@ class ControlReferenceTemplate:
elif tag == 0x95:
self.usage_qualifier = value
else:
raise SwError(SW["ERR_REFNOTUSABLE"])
error = True
if error:
raise SwError(SW["ERR_REFNOTUSABLE"])
else:
return SW["NORMAL"], ""
def __set_algo(self, data):