diff options
Diffstat (limited to 'lib/softoken/pkcs11c.c')
-rw-r--r-- | lib/softoken/pkcs11c.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/softoken/pkcs11c.c b/lib/softoken/pkcs11c.c index a0ef85aca..cbdd2108a 100644 --- a/lib/softoken/pkcs11c.c +++ b/lib/softoken/pkcs11c.c @@ -2099,7 +2099,12 @@ static SECStatus sftk_HMACCmp(CK_ULONG *copyLen, unsigned char *sig, unsigned int sigLen, unsigned char *hash, unsigned int hashLen) { - return (NSS_SecureMemcmp(sig, hash, *copyLen) == 0) ? SECSuccess : SECFailure; + if (NSS_SecureMemcmp(sig, hash, *copyLen) == 0) { + return SECSuccess; + } + + PORT_SetError(SEC_ERROR_BAD_SIGNATURE); + return SECFailure; } /* |