fix: check return value

This commit is contained in:
iceman1001 2019-02-24 19:50:24 +01:00
parent a49b3763dd
commit 47c808fd5c

View file

@ -347,7 +347,9 @@ 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);
}