Only request and upload the device certificate if needed.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -217,6 +217,9 @@ def initialize(picohsm, args):
|
||||
so_pin = '57621880'
|
||||
|
||||
picohsm.initialize(pin=pin, sopin=so_pin)
|
||||
try:
|
||||
picohsm.select_file(0x2f02)
|
||||
except APDUResponse:
|
||||
response = picohsm.get_contents(DOPrefixes.EE_CERTIFICATE_PREFIX, 0x00)
|
||||
|
||||
cert = bytearray(response)
|
||||
|
||||
Reference in New Issue
Block a user