slightly better
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@150 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
parent
68b5e8673a
commit
97387a1d30
|
@ -102,6 +102,7 @@ class TCOS_Security_Environment(object):
|
||||||
return apdu
|
return apdu
|
||||||
|
|
||||||
def process_rapdu(self, rapdu):
|
def process_rapdu(self, rapdu):
|
||||||
|
result = rapdu
|
||||||
if self.last_c_apdu.cla & 0x0c in (0x0c, 0x08):
|
if self.last_c_apdu.cla & 0x0c in (0x0c, 0x08):
|
||||||
tlv_c_data = TLV_utils.unpack(self.last_c_apdu.data)
|
tlv_c_data = TLV_utils.unpack(self.last_c_apdu.data)
|
||||||
|
|
||||||
|
@ -118,11 +119,9 @@ class TCOS_Security_Environment(object):
|
||||||
data = TLV_utils.pack(tlv_data, recalculate_length = True)
|
data = TLV_utils.pack(tlv_data, recalculate_length = True)
|
||||||
new_apdu = R_APDU(rapdu, data = data)
|
new_apdu = R_APDU(rapdu, data = data)
|
||||||
|
|
||||||
return new_apdu
|
result = new_apdu
|
||||||
else:
|
|
||||||
return rapdu
|
return result
|
||||||
else:
|
|
||||||
return rapdu
|
|
||||||
|
|
||||||
def encrypt_command(self, tlv_data):
|
def encrypt_command(self, tlv_data):
|
||||||
config = self.get_config(SE_APDU, TEMPLATE_CT)
|
config = self.get_config(SE_APDU, TEMPLATE_CT)
|
||||||
|
|
Loading…
Reference in New Issue