aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands_0.8.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 01:15:26 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 10:13:05 +0200
commit59ae52487d142fb2b13407419351255c667faa14 (patch)
tree06a256eb98a2602cb23097bc09fe66b67a73e917 /include/stick10_commands_0.8.h
parentbe0d677aa2e7eb87a309dc3927c0917380892641 (diff)
downloadlibnitrokey-59ae52487d142fb2b13407419351255c667faa14.tar.gz
libnitrokey-59ae52487d142fb2b13407419351255c667faa14.tar.bz2
Do not log volatile data
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick10_commands_0.8.h')
-rw-r--r--include/stick10_commands_0.8.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/stick10_commands_0.8.h b/include/stick10_commands_0.8.h
index 4337bb7..3aa60e3 100644
--- a/include/stick10_commands_0.8.h
+++ b/include/stick10_commands_0.8.h
@@ -90,8 +90,12 @@ namespace nitrokey {
ss << "temporary_admin_password:\t" << temporary_admin_password << std::endl;
ss << "type:\t" << type << std::endl;
ss << "id:\t" << (int)id << std::endl;
+#ifdef LOG_VOLATILE_DATA
ss << "data:" << std::endl
<< ::nitrokey::misc::hexdump((const char *) (&data), sizeof data);
+#else
+ ss << " Volatile data not logged" << std::endl;
+#endif
return ss.str();
}
} __packed;
@@ -105,8 +109,12 @@ namespace nitrokey {
bool isValid() const { return true; }
std::string dissect() const {
std::stringstream ss;
+#ifdef LOG_VOLATILE_DATA
ss << "data:" << std::endl
<< ::nitrokey::misc::hexdump((const char *) (&data), sizeof data);
+#else
+ ss << " Volatile data not logged" << std::endl;
+#endif
return ss.str();
}
} __packed;