Fix CRC localisation code.
New issue Summary: Add regression tests for CRC location in encyphered data files. The CRC position location code in mifare_cryto_postprocess_data() shall be checked. new issue Summary: Rework mifare_cryto_postprocess_data() CRC localisations The function has two different implementation of the same feature: locate a CRC at the end of a decyphered stream and check it. The crc32 will fail if the last CRC byte is 0x80, and the crc16 code looks awful. A refactoring would make our life easier.
This commit is contained in:
parent
8628d59c5b
commit
d9ed7f2c24
1 changed files with 1 additions and 1 deletions
|
@ -552,7 +552,7 @@ mifare_cryto_postprocess_data (MifareTag tag, void *data, ssize_t *nbytes, int c
|
|||
} else {
|
||||
end_crc_pos++;
|
||||
}
|
||||
} while (!verified && (end_crc_pos < *nbytes - 1));
|
||||
} while (!verified && (end_crc_pos < *nbytes));
|
||||
|
||||
if (!verified) {
|
||||
warnx ("(3)DES not verified");
|
||||
|
|
Loading…
Reference in a new issue