summaryrefslogtreecommitdiff
path: root/include/stick20_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 15:54:00 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 15:54:00 +0200
commit06c0deb7935a9390a67bc02d6c323e64c785a026 (patch)
treec8343c0e1d504b2ae7d1ff5a727084f78a015f7e /include/stick20_commands.h
parentbe0d677aa2e7eb87a309dc3927c0917380892641 (diff)
parent3b5f40a19ca6c6fde55fcdab4ff0a9f91a46a051 (diff)
downloadlibnitrokey-06c0deb7935a9390a67bc02d6c323e64c785a026.tar.gz
libnitrokey-06c0deb7935a9390a67bc02d6c323e64c785a026.tar.bz2
Merge branch 'do_not_log_volatile_data'
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r--include/stick20_commands.h12
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;