From c5d5ab12ab8ca6b9889550f050b859b76fa4bdd7 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 3 Jan 2019 23:48:22 +0000 Subject: Update documentation and test for factory_reset Contrary to my previous beliefs, build_aes_key has to be called even after a factory reset using the Nitrokey API. This patch updates the documentation and the unit tests based on this insight. --- tests/device.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/device.rs b/tests/device.rs index 06e014e..0ad4987 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -344,6 +344,8 @@ fn factory_reset() { assert_ne!("test".to_string(), pws.get_slot_name(0).unwrap()); assert_ne!("testlogin".to_string(), pws.get_slot_login(0).unwrap()); assert_ne!("testpw".to_string(), pws.get_slot_password(0).unwrap()); + + assert_eq!(Ok(()), device.build_aes_key(ADMIN_PASSWORD)); } #[test] -- cgit v1.2.1