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 /NK_C_API.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 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index 00694c7..01963fc 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -358,11 +358,15 @@ extern "C" { }); } - NK_C_API int NK_totp_get_time() { + NK_C_API int NK_totp_set_time_soft(uint64_t time) { auto m = NitrokeyManager::instance(); return get_without_result([&]() { - m->get_time(0); // FIXME check how that should work + m->set_time_soft(time); }); + } + + NK_C_API int NK_totp_get_time() { + return 0; } NK_C_API int NK_change_admin_PIN(const char *current_PIN, const char *new_PIN) { |