aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-12-01 16:01:54 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-12-01 16:01:54 +0100
commit1236bcee420da713e373a4a6b8cec279749c3d74 (patch)
treea35c578a6b5666d96bb3733ee868028ddd1acd88 /NK_C_API.cc
parent57773ad5f7b6eb5e6a2020dd1bd4264bdd823808 (diff)
downloadlibnitrokey-1236bcee420da713e373a4a6b8cec279749c3d74.tar.gz
libnitrokey-1236bcee420da713e373a4a6b8cec279749c3d74.tar.bz2
Connect with serialconnect_with_serial
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 7d0a10e..396171c 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -125,6 +125,13 @@ extern "C" {
return _copy;
}
+ NK_C_API int NK_login_with_serial(const char *serial) {
+ auto m = NitrokeyManager::instance();
+ return get_with_result([&]() {
+ return m->connect_with_serial(serial);
+ });
+ }
+
NK_C_API int NK_login(const char *device_model) {
auto m = NitrokeyManager::instance();
try {