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