From 3ab15750995624222fa32927fee7f9b1598ba3bf Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 12 Nov 2016 11:06:11 +0100 Subject: Move temporary_password to packet end To allow read-only backward compatibility for GET_CODE Signed-off-by: Szczepan Zalega --- include/stick10_commands_0.8.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/stick10_commands_0.8.h b/include/stick10_commands_0.8.h index 5e05405..3644c4d 100644 --- a/include/stick10_commands_0.8.h +++ b/include/stick10_commands_0.8.h @@ -201,8 +201,13 @@ namespace nitrokey { class GetHOTP : Command { public: struct CommandPayload { - uint8_t temporary_user_password[25]; uint8_t slot_number; + struct { + uint64_t challenge; //@unused + uint64_t last_totp_time; //@unused + uint8_t last_interval; //@unused + } __packed _unused; + uint8_t temporary_user_password[25]; bool isValid() const { return (slot_number & 0xF0); } std::string dissect() const { @@ -250,11 +255,11 @@ namespace nitrokey { //user auth public: struct CommandPayload { - uint8_t temporary_user_password[25]; uint8_t slot_number; uint64_t challenge; //@unused uint64_t last_totp_time; //@unused uint8_t last_interval; //@unused + uint8_t temporary_user_password[25]; bool isValid() const { return !(slot_number & 0xF0); } std::string dissect() const { -- cgit v1.2.1