]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fips: change from function call to macro in rsa_enc.c
authorPauli <ppzgs1@gmail.com>
Thu, 8 Aug 2024 01:40:49 +0000 (11:40 +1000)
committerPauli <ppzgs1@gmail.com>
Sat, 10 Aug 2024 06:34:51 +0000 (16:34 +1000)
Use of the function instead of the macro for the indicator unapproved check was
noted in: https://github.com/openssl/openssl/pull/25070#discussion_r1706564363
Fix things to use the macro properly.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25134)

providers/implementations/asymciphers/rsa_enc.c

index 0860ef7890df08ef8726bae1e75f0c65613e2f85..9a6c3032fe79dd8be88d0fc0ba2141ed2a3b6265 100644 (file)
@@ -161,8 +161,7 @@ static int rsa_encrypt(void *vprsactx, unsigned char *out, size_t *outlen,
 #ifdef FIPS_MODULE
     if ((prsactx->pad_mode == RSA_PKCS1_PADDING
          || prsactx->pad_mode == RSA_PKCS1_WITH_TLS_PADDING)
-        && !ossl_FIPS_IND_on_unapproved(OSSL_FIPS_IND_GET(prsactx),
-                                        OSSL_FIPS_IND_SETTABLE1,
+        && !OSSL_FIPS_IND_ON_UNAPPROVED(prsactx, OSSL_FIPS_IND_SETTABLE1,
                                         prsactx->libctx, "RSA Encrypt",
                                         "PKCS#1 v1.5 padding",
                                         FIPS_rsa_pkcs15_padding_disabled)) {