code to check RndA' from PICC was unreachable
This commit is contained in:
@@ -294,14 +294,6 @@ void MifareDES_Auth1(uint8_t mode, uint8_t algo, uint8_t keyno, uint8_t *datain
|
|||||||
desfirekey_t skey = &sessionKey;
|
desfirekey_t skey = &sessionKey;
|
||||||
Desfire_session_key_new( RndA, RndB , key, skey );
|
Desfire_session_key_new( RndA, RndB , key, skey );
|
||||||
//print_result("SESSION : ", skey->data, 8);
|
//print_result("SESSION : ", skey->data, 8);
|
||||||
OnSuccess();
|
|
||||||
cmd_send(CMD_ACK,1,0,0,skey->data,8);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
DbpString("Authetication failed.");
|
|
||||||
OnError();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(encRndA, resp+3, 8);
|
memcpy(encRndA, resp+3, 8);
|
||||||
des_dec(&encRndA, &encRndA, key->data);
|
des_dec(&encRndA, &encRndA, key->data);
|
||||||
@@ -314,6 +306,14 @@ void MifareDES_Auth1(uint8_t mode, uint8_t algo, uint8_t keyno, uint8_t *datain
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OnSuccess();
|
||||||
|
cmd_send(CMD_ACK,1,0,0,skey->data,8);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
DbpString("Authetication failed.");
|
||||||
|
OnError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user