Return EACCES when authentication to an ultralight tag fails
This commit is contained in:
parent
7ae729a65d
commit
184c5dcbdf
1 changed files with 1 additions and 0 deletions
|
@ -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??
|
||||
|
|
Loading…
Reference in a new issue