summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-08-05 09:55:06 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-05 10:19:25 +0200
commitbc5261c18a4608806dcb866afb73f7a979e2e90f (patch)
tree77a71206566c9217f4cba40963ba8c6524451cbc /NitrokeyManager.cc
parent7c1c040bc57dcfd4ef8abdb481ef7b3df2b116b6 (diff)
downloadlibnitrokey-bc5261c18a4608806dcb866afb73f7a979e2e90f.tar.gz
libnitrokey-bc5261c18a4608806dcb866afb73f7a979e2e90f.tar.bz2
Allow user to choose new user PIN when unlocking
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index f7b3492..b61b2b2 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -372,9 +372,10 @@ namespace nitrokey{
FactoryReset::CommandTransaction::run(*device, p);
}
- void NitrokeyManager::unlock_user_password(const char *admin_password) {
+ void NitrokeyManager::unlock_user_password(const char *admin_password, const char *new_user_password) {
auto p = get_payload<UnlockUserPassword>();
strcpyT(p.admin_password, admin_password);
+ strcpyT(p.user_new_password, new_user_password);
UnlockUserPassword::CommandTransaction::run(*device, p);
}