diff --git a/cards/passport_application.py b/cards/passport_application.py index 6d9dc23..57a2652 100644 --- a/cards/passport_application.py +++ b/cards/passport_application.py @@ -69,7 +69,7 @@ class Passport_Security_Environment(TCOS_Security_Environment): return TCOS_Security_Environment.after_send(self, result) - def _mac(self, data): + def _mac(self, config, data): (ssc,) = struct.unpack(">Q", self.card.ssc) ssc = ssc + 1 self.card.ssc = struct.pack(">Q", ssc) diff --git a/cards/tcos_card.py b/cards/tcos_card.py index 153a5be..0432387 100644 --- a/cards/tcos_card.py +++ b/cards/tcos_card.py @@ -308,7 +308,7 @@ class TCOS_Security_Environment(object): if len(block) > 0: do_block(buffer, block) - cct = self._mac("".join(buffer)) + cct = self._mac(config, "".join(buffer)) if print_buffer: print "| Result (Tag 0x8e, length: 0x%02x):" % len(cct) @@ -316,7 +316,7 @@ class TCOS_Security_Environment(object): return cct - def _mac(self, data): + def _mac(self, config, data): return crypto_utils.cipher( True, self.get_cipherspec(config), self.get_key(config),