summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nitrocli/README.md10
-rw-r--r--nitrocli/src/nitrokey.rs6
2 files changed, 10 insertions, 6 deletions
diff --git a/nitrocli/README.md b/nitrocli/README.md
index 4e41c80..bcb47df 100644
--- a/nitrocli/README.md
+++ b/nitrocli/README.md
@@ -10,6 +10,14 @@ The following commands are currently supported:
- status: Report status information about the Nitrokey.
- clear: Remove the user PIN from gpg-agent's cache.
+### *Note:*
+----------------------------------------------------------------------
+> **nitrocli** requires the Nitrokey Storage to be running **firmware
+> version 0.47** or higher. Versions before that reported incorrect
+> checksums which will cause the program to indicate data retrieval
+> errors, causing commands to fail.
+----------------------------------------------------------------------
+
Usage
-----
@@ -23,7 +31,7 @@ $ nitrocli open
$ nitrocli status
Status:
SD card ID: 0xdeadbeef
- firmware version: 0.44
+ firmware version: 0.47
firmware: unlocked
storage keys: created
user retry count: 3
diff --git a/nitrocli/src/nitrokey.rs b/nitrocli/src/nitrokey.rs
index 2691c01..f8995eb 100644
--- a/nitrocli/src/nitrokey.rs
+++ b/nitrocli/src/nitrokey.rs
@@ -78,11 +78,7 @@ impl<P> Report<P>
}
pub fn is_valid(&self) -> bool {
- // TODO: Certain commands return a wrong CRC code that does not
- // match the actual report content. For now we defuse the
- // check but that cannot stay.
- // return self.crc == crc(self.data.as_ref());
- return self.crc != 0;
+ return self.crc == crc(self.data.as_ref());
}
}