summaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r--NK_C_API.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc
index b755c70..6265215 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -175,6 +175,15 @@ extern const char * NK_status() {
});
}
+extern const char * NK_device_serial_number(){
+ auto m = NitrokeyManager::instance();
+ return get_with_string_result([&](){
+ string && s = m->get_serial_number();
+ char * rs = strdup(s.c_str());
+ clear_string(s);
+ return rs;
+ });
+}
extern uint32_t NK_get_hotp_code(uint8_t slot_number) {
return NK_get_hotp_code_PIN(slot_number, "");