diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-25 18:32:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:57 +0200 |
commit | b37e5990aa409689e5d6162776583616ac03e0ac (patch) | |
tree | efb9585d220fa737aab90a35541b76bddfb6a09d /NK_C_API.cc | |
parent | 689f38b7a4bbb823b8d43bab8357a32558d3775c (diff) | |
download | libnitrokey-b37e5990aa409689e5d6162776583616ac03e0ac.tar.gz libnitrokey-b37e5990aa409689e5d6162776583616ac03e0ac.tar.bz2 |
Enabling password safe and password safe status (latter not working yet)
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index 2531982..77bd181 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -197,5 +197,27 @@ extern int NK_change_user_PIN(char *current_PIN, char *new_PIN){ return 0; } +extern int NK_enable_password_safe(const char *user_pin){ + auto m = NitrokeyManager::instance(); + try { + m->enable_password_safe(user_pin); + } + catch (CommandFailedException & commandFailedException){ + NK_last_command_status = commandFailedException.last_command_status; + return commandFailedException.last_command_status; + } + return 0; +} +extern int NK_get_password_safe_slot_status(){ + auto m = NitrokeyManager::instance(); + try { + m->get_password_safe_slot_status(); + } + catch (CommandFailedException & commandFailedException){ + NK_last_command_status = commandFailedException.last_command_status; + return commandFailedException.last_command_status; + } + return 0; +} }
\ No newline at end of file |