diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 19:56:45 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 19:56:45 +0200 |
commit | e1ef8d79809190c5ac5d540bd4aa376dcfda7e93 (patch) | |
tree | 37e00db5876dc1965f0b59a5c6b007fd51f5b603 /NitrokeyManager.cc | |
parent | b46dbfa63f344cd7e5323139cf71cd100a179682 (diff) | |
parent | 9a4e5a3e0161ea2d0d72d371439ee44b8b137489 (diff) | |
download | libnitrokey-e1ef8d79809190c5ac5d540bd4aa376dcfda7e93.tar.gz libnitrokey-e1ef8d79809190c5ac5d540bd4aa376dcfda7e93.tar.bz2 |
Merge branch 'pr_114'
Cleanup API related to device's TOTP time management
Fixes #114
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r-- | NitrokeyManager.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 085bf78..addfdbf 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -666,11 +666,15 @@ using nitrokey::misc::strcpyT; return false; } - bool NitrokeyManager::get_time(uint64_t time) { + void NitrokeyManager::set_time_soft(uint64_t time) { auto p = get_payload<SetTime>(); p.reset = 0; p.time = time; SetTime::CommandTransaction::run(device, p); + } + + bool NitrokeyManager::get_time(uint64_t time) { + set_time_soft(time); return true; } |