From ce0a70318adf6f68cf99c3fcb3c030161e2addd2 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 23 Jun 2018 11:47:10 +0200 Subject: Handle WINK command Signed-off-by: Szczepan Zalega --- libnitrokey/NitrokeyManager.h | 5 +++++ libnitrokey/command_id.h | 2 ++ libnitrokey/stick20_commands.h | 6 ++++++ 3 files changed, 13 insertions(+) (limited to 'libnitrokey') 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 { + public: + typedef Transaction + CommandTransaction; + }; + class CheckSmartcardUsage : Command { public: typedef Transaction -- cgit v1.2.1