diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-07-09 11:34:53 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-07-09 13:37:42 +0200 |
commit | fe8161ba51d65382a20650a75f06e1cc7b753e68 (patch) | |
tree | 98b8d1748034297a063ed6177267e251b2a40b6a | |
parent | a0ebd37765027121b85dfd6b78b453a50adc69c9 (diff) | |
download | nitrokey-rs-fe8161ba51d65382a20650a75f06e1cc7b753e68.tar.gz nitrokey-rs-fe8161ba51d65382a20650a75f06e1cc7b753e68.tar.bz2 |
Check retry count before building AES key in test
Due to a timing issue, some calls to the build_aes_key function may fail
after a factory reset. As a workaround for this firmware bug, we check
the user retry count before building the aes key in the factory_reset
test. For details, see the upstream issue:
https://github.com/Nitrokey/nitrokey-pro-firmware/issues/57
-rw-r--r-- | tests/device.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/device.rs b/tests/device.rs index a2bdfb5..e367558 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -344,6 +344,7 @@ fn factory_reset(device: DeviceWrapper) { assert_utf8_err_or_ne("testpw", pws.get_slot_password(0)); drop(pws); + assert_ok!(3, device.get_user_retry_count()); assert_ok!((), device.build_aes_key(DEFAULT_ADMIN_PIN)); } |