aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-26 21:09:16 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:57 +0200
commit7f2bea1869529fb3fa53d809260e2713b43a1fd8 (patch)
tree9ca77a4f70fc7a27304c56399169e137157aeebc /NK_C_API.cc
parentf6bd34b262b66fde862aa3d95c339f5c587156eb (diff)
downloadlibnitrokey-7f2bea1869529fb3fa53d809260e2713b43a1fd8.tar.gz
libnitrokey-7f2bea1869529fb3fa53d809260e2713b43a1fd8.tar.bz2
Erase password safe slot
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r--NK_C_API.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc
index 542c6ad..4f7195e 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -301,6 +301,13 @@ extern int NK_write_password_safe_slot(uint8_t slot_number, const char *slot_nam
});
}
+extern int NK_erase_password_safe_slot(uint8_t slot_number) {
+ auto m = NitrokeyManager::instance();
+ return get_without_result([&](){
+ m->erase_password_safe_slot(slot_number);
+ });
+}
+
}