From 7d579ca0ca59095596275f7b891dacce54398f1f Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 19 Oct 2016 09:05:25 +0200 Subject: Add all devices' and commands' statuses Signed-off-by: Szczepan Zalega --- include/command_id.h | 13 ++++++++++++- include/device_proto.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/command_id.h b/include/command_id.h index 093de1f..8148cc1 100644 --- a/include/command_id.h +++ b/include/command_id.h @@ -22,11 +22,22 @@ namespace proto { namespace stick10 { enum class command_status : uint8_t { ok = 0, + wrong_CRC, + wrong_slot, + slot_not_programmed, + wrong_password = 4, + not_authorized, + timestamp_warning, + no_name_error, + not_supported, + unknown_command, + AES_dec_failed }; enum class device_status : uint8_t { ok = 0, busy = 1, - wrong_password = 4, + error, + received_report, }; } diff --git a/include/device_proto.h b/include/device_proto.h index 6b06a16..45f165b 100644 --- a/include/device_proto.h +++ b/include/device_proto.h @@ -251,7 +251,7 @@ namespace nitrokey { resp.device_status = static_cast(stick10::device_status::busy); break; case stick20::device_status::wrong_password: - resp.last_command_status = static_cast(stick10::device_status::wrong_password); + resp.last_command_status = static_cast(stick10::command_status::wrong_password); resp.device_status = static_cast(stick10::device_status::ok); break; default: -- cgit v1.2.1