Blame SOURCES/0003-Fix-local-CA-to-work-under-FIPS.patch

774055
From 62a6634867db5d9f79b613055b8788136d4cb41d Mon Sep 17 00:00:00 2001
774055
From: Ade Lee <alee@redhat.com>
774055
Date: Wed, 14 Apr 2021 15:34:48 -0400
774055
Subject: [PATCH] Fix local CA to work under FIPS
774055
774055
The PKCS12 file used for the local CA fails to be created because
774055
it uses default OpenSSL encryption algorithms that are disallowed
774055
under FIPS.  This patch simply updates the PKCS12_create() command
774055
to use allowed encryption algorithms.
774055
---
774055
 src/local.c | 4 +++-
774055
 1 file changed, 3 insertions(+), 1 deletion(-)
774055
774055
diff --git a/src/local.c b/src/local.c
774055
index 92bea144..2f50ac77 100644
774055
--- a/src/local.c
774055
+++ b/src/local.c
774055
@@ -39,6 +39,7 @@
774055
 
774055
 #include <openssl/asn1.h>
774055
 #include <openssl/err.h>
774055
+#include <openssl/obj_mac.h>
774055
 #include <openssl/pem.h>
774055
 #include <openssl/pkcs12.h>
774055
 #include <openssl/rand.h>
774055
@@ -372,7 +373,8 @@ get_signer_info(void *parent, char *localdir, X509 ***roots,
774055
 			return CM_SUBMIT_STATUS_UNREACHABLE;
774055
 		}
774055
 		p12 = PKCS12_create(NULL, CONSTANTCN, *signer_key, *signer_cert,
774055
-				    cas, 0, 0, 0, 0, 0);
774055
+				    cas, NID_aes_128_cbc, NID_aes_128_cbc,
774055
+				    0, 0, 0);
774055
 		if (p12 != NULL) {
774055
 			if (!i2d_PKCS12_fp(fp, p12)) {
774055
 				fclose(fp);
774055
-- 
774055
2.26.3
774055