Remove weird code.
I should quit coding drunk... or maybe start to...
This commit is contained in:
parent
a6e52db696
commit
143042fb0b
3 changed files with 1 additions and 6 deletions
|
@ -135,7 +135,6 @@ typedef enum {
|
|||
|
||||
#define ENC_COMMAND 0x1000
|
||||
#define NO_CRC 0x2000
|
||||
#define UNSPECIFIED_DATA_LENGTH 0x4000
|
||||
|
||||
#define MAC_MASK 0x0F0
|
||||
#define CMAC_MACK 0xF00
|
||||
|
|
|
@ -1214,9 +1214,6 @@ read_data (MifareTag tag, uint8_t command, uint8_t file_no, off_t offset, size_t
|
|||
((uint8_t *)data)[bytes_received++] = 0x00;
|
||||
|
||||
ssize_t sr = bytes_received;
|
||||
uint8_t uds = 0;
|
||||
if (!length)
|
||||
uds |= UNSPECIFIED_DATA_LENGTH;
|
||||
p = mifare_cryto_postprocess_data (tag, data, &sr, cs | CMAC_COMMAND | CMAC_VERIFY | MAC_VERIFY);
|
||||
|
||||
return sr - 1;
|
||||
|
|
|
@ -590,9 +590,8 @@ mifare_cryto_postprocess_data (MifareTag tag, void *data, ssize_t *nbytes, int c
|
|||
while (!*p) {
|
||||
p--;
|
||||
}
|
||||
if (UNSPECIFIED_DATA_LENGTH && (*p == 0x80)) {
|
||||
if (0x80 == *p)
|
||||
p--;
|
||||
}
|
||||
p -= 3;
|
||||
|
||||
uint8_t crc_ref[4];
|
||||
|
|
Loading…
Reference in a new issue