diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 01:15:26 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 10:13:05 +0200 |
commit | 59ae52487d142fb2b13407419351255c667faa14 (patch) | |
tree | 06a256eb98a2602cb23097bc09fe66b67a73e917 /include/stick20_commands.h | |
parent | be0d677aa2e7eb87a309dc3927c0917380892641 (diff) | |
download | libnitrokey-59ae52487d142fb2b13407419351255c667faa14.tar.gz libnitrokey-59ae52487d142fb2b13407419351255c667faa14.tar.bz2 |
Do not log volatile data
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r-- | include/stick20_commands.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/stick20_commands.h b/include/stick20_commands.h index 61758f6..5f99d28 100644 --- a/include/stick20_commands.h +++ b/include/stick20_commands.h @@ -3,7 +3,7 @@ -#include <stdint.h> +#include <cstdint> #include "command.h" #include <string> #include <sstream> @@ -18,7 +18,7 @@ namespace nitrokey { * STICK20 protocol command ids * a superset (almost) of STICK10 */ -#define print_to_ss(x) ( ss << " " << (#x) <<":\t" << (x) << std::endl ); + namespace stick20 { class ChangeAdminUserPin20Current : @@ -46,8 +46,8 @@ namespace nitrokey { uint8_t new_update_password[20]; std::string dissect() const { std::stringstream ss; - print_to_ss( current_update_password ); - print_to_ss( new_update_password ); + print_to_ss_volatile( current_update_password ); + print_to_ss_volatile( new_update_password ); return ss.str(); } }; @@ -78,7 +78,7 @@ namespace nitrokey { std::stringstream ss; print_to_ss( (int) volume_flag ); print_to_ss( kind ); - print_to_ss(admin_pin); + print_to_ss_volatile(admin_pin); return ss.str(); } void set_kind_user() { @@ -274,7 +274,7 @@ namespace nitrokey { print_to_ss((int) SlotNr_u8); print_to_ss((int) StartBlockPercent_u8); print_to_ss((int) EndBlockPercent_u8); - print_to_ss(HiddenVolumePassword_au8); + print_to_ss_volatile(HiddenVolumePassword_au8); return ss.str(); } } __packed; |