isaacpittman-hitachi / rpms / openssl

Forked from rpms/openssl 2 years ago
Clone
3da501
From 34e3cbf99f2113ca01b460cf37b56460262979af Mon Sep 17 00:00:00 2001
3da501
From: slontis <shane.lontis@oracle.com>
3da501
Date: Wed, 26 Oct 2022 11:10:50 +1000
3da501
Subject: [PATCH] Use RSA CRT parameters in FIPS self tests.
3da501
3da501
Fixes #19488
3da501
3da501
Use the correct OSSL_PKEY_PARAM_RSA CRT names fior the self tests.
3da501
The invalid names cause CRT parameters to be silently ignored.
3da501
3da501
Reviewed-by: Tim Hudson <tjh@openssl.org>
3da501
Reviewed-by: Richard Levitte <levitte@openssl.org>
3da501
Reviewed-by: Tomas Mraz <tomas@openssl.org>
3da501
(Merged from https://github.com/openssl/openssl/pull/19501)
3da501
3da501
(cherry picked from commit c7424fe68c65aa2187a8e4028d7dea742b95d81a)
3da501
(cherry picked from commit 4215d649e92bc4c42997ec4a1e65beba1055bbe1)
3da501
---
3da501
 providers/fips/self_test_data.inc | 10 +++++-----
3da501
3da501
diff --git a/providers/fips/self_test_data.inc b/providers/fips/self_test_data.inc
3da501
index 5f057d5679f1..8ae8cd6f4a5a 100644
3da501
--- a/providers/fips/self_test_data.inc
3da501
+++ b/providers/fips/self_test_data.inc
3da501
@@ -1270,11 +1270,11 @@ static const ST_KAT_PARAM rsa_crt_key[] = {
3da501
     ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_N, rsa_n),
3da501
     ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_E, rsa_e),
3da501
     ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_D, rsa_d),
3da501
-    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR, rsa_p),
3da501
-    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR, rsa_q),
3da501
-    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT, rsa_dp),
3da501
-    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT, rsa_dq),
3da501
-    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_COEFFICIENT, rsa_qInv),
3da501
+    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR1, rsa_p),
3da501
+    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR2, rsa_q),
3da501
+    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT1, rsa_dp),
3da501
+    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT2, rsa_dq),
3da501
+    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_COEFFICIENT1, rsa_qInv),
3da501
     ST_KAT_PARAM_END()
3da501
 };
3da501