Blame SOURCES/0004-Override-default-paths-for-the-CA-directory-tree.patch

2871ff
From 6790960076742a9053c624e26fbb87fcd5789e27 Mon Sep 17 00:00:00 2001
2871ff
From: Tomas Mraz <tmraz@fedoraproject.org>
2871ff
Date: Thu, 24 Sep 2020 09:17:26 +0200
2871ff
Subject: Override default paths for the CA directory tree
2871ff
2871ff
Also add default section to load crypto-policies configuration
2871ff
for TLS.
2871ff
2871ff
It needs to be reverted before running tests.
2871ff
2871ff
(was openssl-1.1.1-conf-paths.patch)
2871ff
---
2871ff
 apps/CA.pl.in    |  2 +-
2871ff
 apps/openssl.cnf | 20 ++++++++++++++++++--
2871ff
 2 files changed, 19 insertions(+), 3 deletions(-)
2871ff
2871ff
diff --git a/apps/CA.pl.in b/apps/CA.pl.in
2871ff
index c0afb96716..d6a5fabd16 100644
2871ff
--- a/apps/CA.pl.in
2871ff
+++ b/apps/CA.pl.in
2871ff
@@ -29,7 +29,7 @@ my $X509 = "$openssl x509";
2871ff
 my $PKCS12 = "$openssl pkcs12";
2871ff
 
2871ff
 # Default values for various configuration settings.
2871ff
-my $CATOP = "./demoCA";
2871ff
+my $CATOP = "/etc/pki/CA";
2871ff
 my $CAKEY = "cakey.pem";
2871ff
 my $CAREQ = "careq.pem";
2871ff
 my $CACERT = "cacert.pem";
2871ff
diff -up openssl-3.0.0-alpha16/apps/openssl.cnf.default-tls openssl-3.0.0-alpha16/apps/openssl.cnf
2871ff
--- openssl-3.0.0-alpha16/apps/openssl.cnf.default-tls	2021-07-06 13:41:39.204978272 +0200
2871ff
+++ openssl-3.0.0-alpha16/apps/openssl.cnf	2021-07-06 13:49:50.362857683 +0200
2871ff
@@ -53,6 +53,8 @@ tsa_policy3 = 1.2.3.4.5.7
2871ff
 
2871ff
 [openssl_init]
2871ff
 providers = provider_sect
2871ff
+# Load default TLS policy configuration
2871ff
+ssl_conf = ssl_module
2871ff
 
2871ff
 # List of providers to load
2871ff
 [provider_sect]
2871ff
@@ -64,6 +66,13 @@ default = default_sect
2871ff
 [default_sect]
2871ff
 # activate = 1
2871ff
 
2871ff
+[ ssl_module ]
2871ff
+
2871ff
+system_default = crypto_policy
2871ff
+
2871ff
+[ crypto_policy ]
2871ff
+
2871ff
+.include = /etc/crypto-policies/back-ends/opensslcnf.config
2871ff
 
2871ff
 ####################################################################
2871ff
 [ ca ]
2871ff
@@ -72,7 +81,7 @@ default_ca	= CA_default		# The default c
2871ff
 ####################################################################
2871ff
 [ CA_default ]
2871ff
 
2871ff
-dir		= ./demoCA		# Where everything is kept
2871ff
+dir		= /etc/pki/CA		# Where everything is kept
2871ff
 certs		= $dir/certs		# Where the issued certs are kept
2871ff
 crl_dir		= $dir/crl		# Where the issued crl are kept
2871ff
 database	= $dir/index.txt	# database index file.
2871ff
@@ -304,7 +313,7 @@ default_tsa = tsa_config1	# the default
2871ff
 [ tsa_config1 ]
2871ff
 
2871ff
 # These are used by the TSA reply generation only.
2871ff
-dir		= ./demoCA		# TSA root directory
2871ff
+dir		= /etc/pki/CA		# TSA root directory
2871ff
 serial		= $dir/tsaserial	# The current serial number (mandatory)
2871ff
 crypto_device	= builtin		# OpenSSL engine to use for signing
2871ff
 signer_cert	= $dir/tsacert.pem 	# The TSA signing certificate