mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 01:18:06 +00:00
Fix when ping is provided during the initialization.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
9e9cf9b768
commit
f2874ae3ef
1 changed files with 7 additions and 1 deletions
|
|
@ -241,7 +241,13 @@ def initialize(card, args):
|
|||
_ = input('[Press enter to confirm]')
|
||||
|
||||
send_apdu(card, 0xA4, 0x04, 0x00, [0xE8, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x81, 0xC3, 0x1F, 0x02, 0x01])
|
||||
if (not args.pin):
|
||||
if (args.pin):
|
||||
pin = args.pin.encode()
|
||||
try:
|
||||
response = send_apdu(card, 0x20, 0x00, 0x81, list(pin))
|
||||
except APDUResponse:
|
||||
pass
|
||||
else:
|
||||
pin = b'648219'
|
||||
|
||||
if (args.so_pin):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue