mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
fix: check return value
This commit is contained in:
parent
a49b3763dd
commit
47c808fd5c
1 changed files with 4 additions and 2 deletions
|
@ -347,8 +347,10 @@ bool CheckrpIdHash(json_t *json, uint8_t *hash) {
|
|||
uint8_t hash2[32] = {0};
|
||||
|
||||
JsonLoadStr(json, "$.RelyingPartyEntity.id", hashval);
|
||||
sha256hash((uint8_t *)hashval, strlen(hashval), hash2);
|
||||
|
||||
int res = sha256hash((uint8_t *)hashval, strlen(hashval), hash2);
|
||||
if (res)
|
||||
return false;
|
||||
|
||||
return !memcmp(hash, hash2, 32);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue