From 9d7965d73b035653263676bf61a29821d8367446 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Tue, 2 Dec 2014 09:00:47 +0100 Subject: [PATCH] fixed parsing of MSE:SET AT for nPA in AusweisApp2 --- virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py index 7463c40..4d5cf7b 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py @@ -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,9 +83,12 @@ class ControlReferenceTemplate: elif tag == 0x95: self.usage_qualifier = value 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): """