diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-26 22:11:10 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:57 +0200 |
commit | 1018b7a7d8d7da124d706bc5d6679c523e5f1d0f (patch) | |
tree | f859f7d8cd59c14131f58c6bc4c34c41e00604b8 /NK_C_API.cc | |
parent | 7d71398f4043c10c3870cb9deb2eae7bf1c5f0ee (diff) | |
download | libnitrokey-1018b7a7d8d7da124d706bc5d6679c523e5f1d0f.tar.gz libnitrokey-1018b7a7d8d7da124d706bc5d6679c523e5f1d0f.tar.bz2 |
Handle password safe slots programmed status
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index 4f7195e..094a7e3 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -241,16 +241,17 @@ extern int NK_enable_password_safe(const char *user_pin){ } return 0; } -extern int NK_get_password_safe_slot_status(){ +extern uint8_t * NK_get_password_safe_slot_status(){ auto m = NitrokeyManager::instance(); + auto res = new uint8_t[16]; + memset(res, 0, 16); try { - m->get_password_safe_slot_status(); //TODO FIXME + return m->get_password_safe_slot_status(); //TODO FIXME } catch (CommandFailedException & commandFailedException){ NK_last_command_status = commandFailedException.last_command_status; - return commandFailedException.last_command_status; } - return 0; + return res; } extern uint8_t NK_get_user_retry_count(){ |