forked from public/pysim
Add global_platform shell command establish_scp02 and release_scp
Those commands can be used to establish and release a SCP02 secure channel on the currently active logical channel. The prompt is adjusted with a 'SCP02' prefix while the secure channel is established. Change-Id: Ib2f3c8f0563f81a941dd55b97c9836e3a6856407
This commit is contained in:
@@ -108,6 +108,13 @@ class SCP02(SCP):
|
||||
self.card_keys = card_keys
|
||||
self.sk = None
|
||||
self.mac_on_unmodified = False
|
||||
self.security_level = None
|
||||
|
||||
def __str__(self) -> str:
|
||||
if self.security_level:
|
||||
return "%s[%02x]" % (self.__class__.__name__, self.security_level)
|
||||
else:
|
||||
return "%s[??]" % (self.__class__.__name__)
|
||||
|
||||
def _cla(self, sm: bool = False, b8: bool = True) -> int:
|
||||
ret = 0x80 if b8 else 0x00
|
||||
|
||||
Reference in New Issue
Block a user