aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/providers/implementations/signature/rsa_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/providers/implementations/signature/rsa_sig.c')
-rw-r--r--crypto/openssl/providers/implementations/signature/rsa_sig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/openssl/providers/implementations/signature/rsa_sig.c b/crypto/openssl/providers/implementations/signature/rsa_sig.c
index e75b90840b9a..d8357cfe1578 100644
--- a/crypto/openssl/providers/implementations/signature/rsa_sig.c
+++ b/crypto/openssl/providers/implementations/signature/rsa_sig.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -411,7 +411,7 @@ static int rsa_setup_md(PROV_RSA_CTX *ctx, const char *mdname,
if (!ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND_GET(ctx),
OSSL_FIPS_IND_SETTABLE1,
ctx->libctx,
- md_nid, sha1_allowed, desc,
+ md_nid, sha1_allowed, 1, desc,
ossl_fips_config_signature_digest_check))
goto err;
}
@@ -952,7 +952,7 @@ static int rsa_verify_recover(void *vprsactx,
return 0;
ret = RSA_public_decrypt(siglen, sig, prsactx->tbuf, prsactx->rsa,
RSA_X931_PADDING);
- if (ret < 1) {
+ if (ret <= 0) {
ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
@@ -1002,7 +1002,7 @@ static int rsa_verify_recover(void *vprsactx,
} else {
ret = RSA_public_decrypt(siglen, sig, rout, prsactx->rsa,
prsactx->pad_mode);
- if (ret < 0) {
+ if (ret <= 0) {
ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}