aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-25 17:38:15 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:57 +0200
commit8f4fb5d6320241a27d4d8c93d819daba40c58867 (patch)
tree04d4aa7565550516756cee7687c93796892be73b /include/stick10_commands.h
parent7c4012b7074252d8a5cc3b462705e171112a85bf (diff)
downloadlibnitrokey-8f4fb5d6320241a27d4d8c93d819daba40c58867.tar.gz
libnitrokey-8f4fb5d6320241a27d4d8c93d819daba40c58867.tar.bz2
Handle changing user and admin PINs
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick10_commands.h')
-rw-r--r--include/stick10_commands.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index ca836db..d923d93 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -611,6 +611,12 @@ class ChangeUserPin : Command<CommandID::CHANGE_USER_PIN> {
struct CommandPayload {
uint8_t old_pin[25];
uint8_t new_pin[25];
+ std::string dissect() const {
+ std::stringstream ss;
+ ss << " old_pin:\t" << old_pin<< std::endl;
+ ss << " new_pin:\t" << new_pin<< std::endl;
+ return ss.str();
+ }
} __packed;
typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload>
@@ -633,6 +639,12 @@ class ChangeAdminPin : Command<CommandID::CHANGE_ADMIN_PIN> {
struct CommandPayload {
uint8_t old_pin[25];
uint8_t new_pin[25];
+ std::string dissect() const {
+ std::stringstream ss;
+ ss << " old_pin:\t" << old_pin<< std::endl;
+ ss << " new_pin:\t" << new_pin<< std::endl;
+ return ss.str();
+ }
} __packed;
typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload>