Add config parameter to TCOS_Security_Environment._mac (was forgotten during refactoring)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@188 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
parent
98f1dbe110
commit
47f7e768c1
|
@ -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)
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue