added tesla info command, with some of the data that is available. Needed to fix the apdu chaining and a sneaky bug in get_sw since the apdu response was larger then 256
This commit is contained in:
1 parent
e1902ffa96
commit
f9a65505de
9 files changed
+281
-16
No files matched your search
+2
-2
@@ -262,10 +262,10 @@ uint32_t rotr(uint32_t a, uint8_t n) {
|
||||
return (a >> n) | (a << (32 - n));
|
||||
}
|
||||
|
||||
uint16_t get_sw(const uint8_t *d, uint8_t n) {
|
||||
uint16_t get_sw(const uint8_t *d, uint16_t n) {
|
||||
if (n < 2)
|
||||
return 0;
|
||||
|
||||
n -= 2;
|
||||
return d[n] * 0x0100 + d[n + 1];
|
||||
return (d[n] << 8 | d[n + 1]);
|
||||
}
|
||||
Reference in new issue
Block a user