From 35d73ac92b054d4b24b4fad3676001f29ee184a4 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Thu, 13 Jun 2019 13:56:25 +0200 Subject: Add calls to commands in C API Signed-off-by: Szczepan Zalega --- NK_C_API.cc | 17 +++++++++++++++++ NK_C_API.h | 9 +++++++++ 2 files changed, 26 insertions(+) diff --git a/NK_C_API.cc b/NK_C_API.cc index 844f653..ec7bc29 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -865,6 +865,23 @@ NK_C_API char* NK_get_SD_usage_data_as_string() { }); } + NK_C_API int NK_enable_firmware_update_pro(const char* update_password){ + auto m = NitrokeyManager::instance(); + return get_without_result([&]() { + m->enable_firmware_update_pro(update_password); + }); +} + + NK_C_API int NK_change_firmware_password_pro(const char *current_firmware_password, const char *new_firmware_password) { + auto m = NitrokeyManager::instance(); + return get_without_result([&]() { + m->change_firmware_update_password_pro(current_firmware_password, + new_firmware_password); + }); + } + + + #ifdef __cplusplus } #endif diff --git a/NK_C_API.h b/NK_C_API.h index 79d80c0..7376c9f 100644 --- a/NK_C_API.h +++ b/NK_C_API.h @@ -977,6 +977,15 @@ extern "C" { */ NK_C_API int NK_wink(); + + /** + * FIXME DOC + * @param update_password + * @return + */ + NK_C_API int NK_enable_firmware_update_pro(const char* update_password); + NK_C_API int NK_change_firmware_password_pro(const char *current_firmware_password, const char *new_firmware_password); + #ifdef __cplusplus } #endif -- cgit v1.2.3