summaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-12-12 16:58:24 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-02-23 15:42:37 +0100
commit809b618d4d064cedc7070cac5ccc8797e5d89f54 (patch)
treed2423759226e6f0a7d016ca2866acd03c35abbe7 /NK_C_API.cc
parent0b0898f2b5d88738aa8f49ce6b9ba98db1c775f7 (diff)
downloadlibnitrokey-809b618d4d064cedc7070cac5ccc8797e5d89f54.tar.gz
libnitrokey-809b618d4d064cedc7070cac5ccc8797e5d89f54.tar.bz2
Correct getting minor and major from firmware version
Add get_minor_firmware_version Correct get_major_firmware version (was returning minor instead) Name 3rd version field for test builds Use minor firmware version in tests 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 33a5fbb..c886b6a 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -569,6 +569,13 @@ extern "C" {
NK_C_API int NK_get_major_firmware_version() {
auto m = NitrokeyManager::instance();
return get_with_result([&]() {
+ return m->get_major_firmware_version();
+ });
+ }
+
+ NK_C_API int NK_get_minor_firmware_version() {
+ auto m = NitrokeyManager::instance();
+ return get_with_result([&]() {
return m->get_minor_firmware_version();
});
}