Chg: faster authentication by lower timeout limit. (@pwpiwi)

This commit is contained in:
iceman1001 2019-12-30 12:50:44 +01:00
commit 6121d816e7

View file

@ -190,8 +190,17 @@ int mifare_classic_authex(struct Crypto1State *pcs, uint32_t uid, uint8_t blockN
// Transmit reader nonce and reader answer
ReaderTransmitPar(mf_nr_ar, sizeof(mf_nr_ar), par, NULL);
// save standard timeout
uint32_t save_timeout = iso14a_get_timeout();
// set timeout for authentication response
iso14a_set_timeout(106);
// Receive 4 byte tag answer
len = ReaderReceive(receivedAnswer, receivedAnswerPar);
iso14a_set_timeout(save_timeout);
if (!len) {
if (DBGLEVEL >= DBG_EXTENDED) Dbprintf("Authentication failed. Card timeout.");
return 2;