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

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