aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-11-08 17:03:48 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 20:21:21 +0100
commit130d7f12e42505a33f41073983d868ca0c3c78d1 (patch)
tree1e7067147c6aef95799a9b627dfbe23d18baf968 /include/stick10_commands.h
parentf60f2cf0144a91769a5fc00fac1314d2e00cdf0d (diff)
downloadlibnitrokey-130d7f12e42505a33f41073983d868ca0c3c78d1.tar.gz
libnitrokey-130d7f12e42505a33f41073983d868ca0c3c78d1.tar.bz2
Fix for auth issue in NK Pro
for commands EraseSlot, WriteToSlot, GetCode + tests Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick10_commands.h')
-rw-r--r--include/stick10_commands.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index f02fd70..5ae2591 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -48,6 +48,7 @@ class EraseSlot : Command<CommandID::ERASE_SLOT> {
public:
struct CommandPayload {
uint8_t slot_number;
+ uint8_t temporary_admin_password[25];
bool isValid() const { return !(slot_number & 0xF0); }
std::string dissect() const {
@@ -137,6 +138,7 @@ class WriteToHOTPSlot : Command<CommandID::WRITE_TO_SLOT> {
};
class WriteToTOTPSlot : Command<CommandID::WRITE_TO_SLOT> {
+ //admin auth
public:
struct CommandPayload {
uint8_t slot_number;
@@ -182,6 +184,7 @@ class WriteToTOTPSlot : Command<CommandID::WRITE_TO_SLOT> {
};
class GetTOTP : Command<CommandID::GET_CODE> {
+ //user auth
public:
struct CommandPayload {
uint8_t slot_number;
@@ -612,6 +615,7 @@ class PasswordSafeSendSlotViaHID : Command<CommandID::PW_SAFE_SEND_DATA> {
// TODO "Device::passwordSafeSendSlotDataViaHID"
class WriteGeneralConfig : Command<CommandID::WRITE_CONFIG> {
+ //admin auth
public:
struct CommandPayload {
union{