Return EACCES when authentication to an ultralight tag fails

This commit is contained in:
Robert Clausecker 2014-02-25 01:31:37 +01:00 committed by Philippe Teuwen
parent 7ae729a65d
commit 184c5dcbdf

View file

@ -301,6 +301,7 @@ mifare_ultralightc_authenticate (MifareTag tag, const MifareDESFireKey key)
rol (PCD_RndA_s, 8);
if (0 != memcmp (PCD_RndA_s, PICC_RndA_s, 8)) {
errno = EACCES;
return -1;
}
// XXX Should we store the state "authenticated" in the tag struct??