Skip to content

Commit e9c90e7

Browse files
committed
no need to use XMEM_NEQ() in PK crypto
1 parent ae69892 commit e9c90e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pk/rsa/rsa_verify_hash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ int rsa_verify_hash_ex(const unsigned char *sig, unsigned long siglen,
155155
/* test OID */
156156
if ((reallen == outlen) &&
157157
(digestinfo[0].size == hash_descriptor[hash_idx].OIDlen) &&
158-
(XMEM_NEQ(digestinfo[0].data, hash_descriptor[hash_idx].OID, sizeof(unsigned long) * hash_descriptor[hash_idx].OIDlen) == 0) &&
158+
(XMEMCMP(digestinfo[0].data, hash_descriptor[hash_idx].OID, sizeof(unsigned long) * hash_descriptor[hash_idx].OIDlen) == 0) &&
159159
(siginfo[1].size == hashlen) &&
160-
(XMEM_NEQ(siginfo[1].data, hash, hashlen) == 0)) {
160+
(XMEMCMP(siginfo[1].data, hash, hashlen) == 0)) {
161161
*stat = 1;
162162
}
163163
} else {
164164
/* only check if the hash is equal */
165165
if ((hashlen == outlen) &&
166-
(XMEM_NEQ(out, hash, hashlen) == 0)) {
166+
(XMEMCMP(out, hash, hashlen) == 0)) {
167167
*stat = 1;
168168
}
169169
}

0 commit comments

Comments
 (0)