no need to use XMEM_NEQ()
in PK crypto
This commit is contained in:
parent
ae698927ff
commit
e9c90e7f63
@ -155,15 +155,15 @@ int rsa_verify_hash_ex(const unsigned char *sig, unsigned long siglen,
|
||||
/* test OID */
|
||||
if ((reallen == outlen) &&
|
||||
(digestinfo[0].size == hash_descriptor[hash_idx].OIDlen) &&
|
||||
(XMEM_NEQ(digestinfo[0].data, hash_descriptor[hash_idx].OID, sizeof(unsigned long) * hash_descriptor[hash_idx].OIDlen) == 0) &&
|
||||
(XMEMCMP(digestinfo[0].data, hash_descriptor[hash_idx].OID, sizeof(unsigned long) * hash_descriptor[hash_idx].OIDlen) == 0) &&
|
||||
(siginfo[1].size == hashlen) &&
|
||||
(XMEM_NEQ(siginfo[1].data, hash, hashlen) == 0)) {
|
||||
(XMEMCMP(siginfo[1].data, hash, hashlen) == 0)) {
|
||||
*stat = 1;
|
||||
}
|
||||
} else {
|
||||
/* only check if the hash is equal */
|
||||
if ((hashlen == outlen) &&
|
||||
(XMEM_NEQ(out, hash, hashlen) == 0)) {
|
||||
(XMEMCMP(out, hash, hashlen) == 0)) {
|
||||
*stat = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user