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

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