gnuk/tool
Szczepan Zalega ea88c3da66 Catch exception, when no KDF data is found
While updating from GNUK 1.2.6, upgrade_by_passwd.py script shows
exception about not found referenced data:
  File "./upgrade_by_passwd.py", line 55, in main
    kdf_data = gnuk.cmd_get_data(0x00, 0xf9).tostring()
  File "/home/sz/work/nitrokey-start-firmware/tool/gnuk_token.py", line 320, in cmd_get_data
    raise ValueError("%02x%02x" % (sw[0], sw[1]))
ValueError: 6a88

While it is checked, whether the KDF DO is empty, there is no
exception catch for not found object. This patch adds it.
Tested update paths 1.2.6 -> 1.2.10, 1.2.6 -> 1.2.6, 1.2.10 -> 1.2.10, 1.2.10 -> 1.2.6.

Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
2018-07-13 16:23:58 +09:00
..
asm-thumb stlinkv2.py: merge Cortex-M0 support for FSM-55 2015-07-06 15:52:04 +09:00
openocd-script update OpenOCD scripts 2013-09-30 17:37:33 +09:00
add_openpgp_authkey_from_gpgssh.py Add new tool/add_openpgp_authkey_from_gpgssh.py 2014-06-05 13:02:05 +09:00
calc_precompute_table_ecc.py add ec_p256k1 2014-02-19 14:51:09 +09:00
dfuse.py Support PyUSB 1.0, too 2013-12-25 11:33:00 +09:00
dump_mem.py add support of card holder certificate 2011-01-28 20:54:05 +09:00
get_raw_public_key.py add tool/get_raw_public_key.py 2012-10-31 16:23:19 +09:00
gnuk_put_binary_libusb.py fix scripts 2016-10-15 20:14:18 +09:00
gnuk_remove_keys_libusb.py Fix tool/. 2018-04-03 17:17:51 +09:00
gnuk_token.py Fix tool/. 2018-04-03 17:17:51 +09:00
gnuk_upgrade.py more change for Python 2015-08-04 12:32:56 +09:00
gnuk-emulation-setup Emulation tool added. 2017-10-05 13:53:48 +09:00
gpg_agent.py more python3 fix 2015-08-03 19:22:02 +09:00
hub_ctrl.py Upgrade tool/hub_ctrl.py 2016-08-03 21:19:34 +09:00
intel_hex.py more python3 fix 2015-08-03 19:22:02 +09:00
kdf_calc.py More tests. 2018-04-04 16:34:07 +09:00
pageant_proxy_to_gpg.py fixes for removing update keys 2013-02-14 11:09:06 +09:00
pinpadtest.py Add pinpadtest info from Thomas Jarosch 2015-07-31 23:12:01 +09:00
rsa_example.key upgrade_by_passwd.py 2012-12-25 14:47:49 +09:00
rsa.py more change for Python 2015-08-04 12:32:56 +09:00
sexp.py fixes for removing update keys 2013-02-14 11:09:06 +09:00
stlinkv2.py Fix USB usage in tool/ 2016-06-01 09:49:28 +09:00
upgrade_by_passwd.py Catch exception, when no KDF data is found 2018-07-13 16:23:58 +09:00
usb_strings.py tool: Improve tool/*.py. 2017-02-01 12:34:35 +09:00