From 88a37af33515e904d0d032602f64bfd213e89581 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 9 Mar 2018 11:13:58 +0100 Subject: C API wrapper for NK_set_unencrypted_volume_rorw_pin_type_user Signed-off-by: Szczepan Zalega --- NK_C_API.cc | 7 +++++++ NK_C_API.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/NK_C_API.cc b/NK_C_API.cc index 66bbcf9..dde150b 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -608,6 +608,13 @@ extern "C" { }); } + NK_C_API int NK_set_unencrypted_volume_rorw_pin_type_user() { + auto m = NitrokeyManager::instance(); + return get_with_result([&]() { + return m->set_unencrypted_volume_rorw_pin_type_user() ? 1 : 0; + }); + } + NK_C_API const char* NK_list_devices_by_cpuID() { auto nm = NitrokeyManager::instance(); return get_with_string_result([&]() { diff --git a/NK_C_API.h b/NK_C_API.h index 3778ad0..27730c9 100644 --- a/NK_C_API.h +++ b/NK_C_API.h @@ -371,6 +371,12 @@ extern "C" { */ NK_C_API int NK_get_minor_firmware_version(); + /** + * Function to determine unencrypted volume PIN type + * @param minor_firmware_version + * @return Returns 1, if set unencrypted volume ro/rw pin type is User, 0 otherwise. + */ + NK_C_API int NK_set_unencrypted_volume_rorw_pin_type_user(); /** -- cgit v1.2.3