summaryrefslogtreecommitdiff
path: root/include/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-03 18:09:49 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-03 18:09:49 +0200
commit7f7cfeb45b579204e0bc94bea37e2c810d2e5ec9 (patch)
tree4058c41e2460fad253ec0290a56166e46a28bc78 /include/stick10_commands.h
parent8f7435e4553916e6cc431e4b5316cc5861fd9063 (diff)
parent7d0d03428f90d3f65452eb7035bb715efec87ac8 (diff)
downloadlibnitrokey-7f7cfeb45b579204e0bc94bea37e2c810d2e5ec9.tar.gz
libnitrokey-7f7cfeb45b579204e0bc94bea37e2c810d2e5ec9.tar.bz2
Merge branch 'OSX_merge_cleaned'
This merge: - fixes issues with invalid mutex - moves tests to Python 3 - allows to compile the code natively under Visual Studio with CMake - allows to compile under QtCreator under MS Windows - fixes some issues with test suite - allows to run tests under Windows - allows to compile using QMake (and easy adding to Qt projects) - decreases delays between sending commands thus increasing 2x communication speed
Diffstat (limited to 'include/stick10_commands.h')
-rw-r--r--include/stick10_commands.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index e863328..8f3ceef 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -130,7 +130,7 @@ class WriteToHOTPSlot : Command<CommandID::WRITE_TO_SLOT> {
ss << std::hex << std::setw(2) << std::setfill('0')<< (int) i << " " ;
ss << std::endl;
ss << "slot_counter:\t[" << (int)slot_counter << "]\t"
- << ::nitrokey::misc::hexdump((const char *)(&slot_counter), sizeof slot_counter, false);
+ << ::nitrokey::misc::hexdump((const uint8_t *)(&slot_counter), sizeof slot_counter, false);
return ss.str();
}
@@ -334,7 +334,7 @@ class ReadSlot : Command<CommandID::READ_SLOT> {
ss << std::hex << std::setw(2) << std::setfill('0')<< (int) i << " " ;
ss << std::endl;
ss << "slot_counter:\t[" << (int)slot_counter << "]\t"
- << ::nitrokey::misc::hexdump((const char *)(&slot_counter), sizeof slot_counter, false);
+ << ::nitrokey::misc::hexdump((const uint8_t *)(&slot_counter), sizeof slot_counter, false);
return ss.str();
}
} __packed;
@@ -372,13 +372,13 @@ class GetStatus : Command<CommandID::GET_STATUS> {
ss << "firmware_version:\t"
<< "[" << firmware_version << "]" << "\t"
<< ::nitrokey::misc::hexdump(
- (const char *)(&firmware_version), sizeof firmware_version, false);
+ (const uint8_t *)(&firmware_version), sizeof firmware_version, false);
ss << "card_serial_u32:\t" << std::hex << card_serial_u32 << std::endl;
ss << "card_serial:\t"
- << ::nitrokey::misc::hexdump((const char *)(card_serial),
+ << ::nitrokey::misc::hexdump((const uint8_t *)(card_serial),
sizeof card_serial, false);
ss << "general_config:\t"
- << ::nitrokey::misc::hexdump((const char *)(general_config),
+ << ::nitrokey::misc::hexdump((const uint8_t *)(general_config),
sizeof general_config, false);
ss << "numlock:\t" << (int)numlock << std::endl;
ss << "capslock:\t" << (int)capslock << std::endl;