summaryrefslogtreecommitdiff
path: root/include/device_proto.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-10 16:05:34 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-10 18:04:19 +0200
commite0284726110bcdcccb6b8fe6c84466cd6c14c612 (patch)
treec84227253949075716436f0ee6e23d8fc4eaf0e7 /include/device_proto.h
parent6290c279b4b0d084dfb6a33526fa1263b0d7a2c0 (diff)
downloadlibnitrokey-e0284726110bcdcccb6b8fe6c84466cd6c14c612.tar.gz
libnitrokey-e0284726110bcdcccb6b8fe6c84466cd6c14c612.tar.bz2
Skip checking packet's CRC
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/device_proto.h')
-rw-r--r--include/device_proto.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/device_proto.h b/include/device_proto.h
index cfb7544..6944bdb 100644
--- a/include/device_proto.h
+++ b/include/device_proto.h
@@ -298,9 +298,9 @@ namespace nitrokey {
};
}
- //SENDPASSWORD gives wrong CRC , for now rely on !=0 (TODO report)
-// if (resp.device_status == 0 && resp.last_command_crc == outp.crc && resp.isCRCcorrect()) break;
- auto CRC_equal_awaited = resp.last_command_crc == outp.crc;
+ //Some of the commands return wrong CRC, for now skip checking it (TODO list and report)
+ //if (resp.device_status == 0 && resp.last_command_crc == outp.crc && resp.isCRCcorrect()) break;
+ auto CRC_equal_awaited = true; // resp.last_command_crc == outp.crc;
if (resp.device_status == static_cast<uint8_t>(stick10::device_status::ok) &&
CRC_equal_awaited && resp.isValid()){
successful_communication = true;