aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-06-23 11:52:30 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2018-06-23 11:52:30 +0200
commit5d4003a6053667ec4ef75a5b39e38cf3f305cbea (patch)
treeff98294621521b3ab3bb6b72f23338b7dbadfd11 /libnitrokey
parent7c06025c9b9c28c642c8acc8bab7cbc974cd5575 (diff)
parentce0a70318adf6f68cf99c3fcb3c030161e2addd2 (diff)
downloadlibnitrokey-5d4003a6053667ec4ef75a5b39e38cf3f305cbea.tar.gz
libnitrokey-5d4003a6053667ec4ef75a5b39e38cf3f305cbea.tar.bz2
Merge branch 'handle_wink_command'
Handle WINK command, introduced in Storage v0.52
Diffstat (limited to 'libnitrokey')
-rw-r--r--libnitrokey/NitrokeyManager.h5
-rw-r--r--libnitrokey/command_id.h2
-rw-r--r--libnitrokey/stick20_commands.h6
3 files changed, 13 insertions, 0 deletions
diff --git a/libnitrokey/NitrokeyManager.h b/libnitrokey/NitrokeyManager.h
index 0689c3f..b48afc5 100644
--- a/libnitrokey/NitrokeyManager.h
+++ b/libnitrokey/NitrokeyManager.h
@@ -288,6 +288,11 @@ char * strndup(const char* str, size_t maxlen);
* @return Returns true, if set unencrypted volume ro/rw pin type is User, false otherwise.
*/
bool set_unencrypted_volume_rorw_pin_type_user();
+
+ /**
+ * Blink red and green LED alternatively and infinitely (until device is reconnected).
+ */
+ void wink();
};
}
diff --git a/libnitrokey/command_id.h b/libnitrokey/command_id.h
index 1092ea9..eb0d450 100644
--- a/libnitrokey/command_id.h
+++ b/libnitrokey/command_id.h
@@ -130,6 +130,8 @@ enum class CommandID : uint8_t {
ENABLE_ADMIN_READONLY_ENCRYPTED_LUN = 0x20 + 30,
ENABLE_ADMIN_READWRITE_ENCRYPTED_LUN = 0x20 + 31,
CHECK_SMARTCARD_USAGE = 0x20 + 32,
+ //v0.52+
+ WINK = 0x20 + 33,
GET_PW_SAFE_SLOT_STATUS = 0x60,
GET_PW_SAFE_SLOT_NAME = 0x61,
diff --git a/libnitrokey/stick20_commands.h b/libnitrokey/stick20_commands.h
index 4b75e6a..7efa1b6 100644
--- a/libnitrokey/stick20_commands.h
+++ b/libnitrokey/stick20_commands.h
@@ -275,6 +275,12 @@ namespace nitrokey {
CommandTransaction;
};
+ class Wink : Command<CommandID::WINK> {
+ public:
+ typedef Transaction<command_id(), struct EmptyPayload, struct EmptyPayload>
+ CommandTransaction;
+ };
+
class CheckSmartcardUsage : Command<CommandID::CHECK_SMARTCARD_USAGE> {
public:
typedef Transaction<command_id(), struct EmptyPayload, EmptyPayload>