no need to use XMEM_NEQ() in PK crypto

This commit is contained in:
Steffen Jaeckel 2017-06-22 08:38:23 +02:00
parent ae698927ff
commit e9c90e7f63

View File

@ -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;
}
}