From 08bd8ae46f948064806a26cd267ec6c75cc67603 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Mar 17 2022 20:44:43 +0000
Subject: [PATCH 1/3] Replace DER-encoded test file with a base64-encoded one


Some build systems will not allow patches that contain
binaries so switch to a base64-encoded file instead.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1492112

Signed-off-by: Rob Crittenden <rcritten@redhat.com>

---

diff --git a/tests/040-pem/bad.isrg-root-x1-cross-signed.der b/tests/040-pem/bad.isrg-root-x1-cross-signed.der
deleted file mode 100644
index 79a33ba..0000000
Binary files a/tests/040-pem/bad.isrg-root-x1-cross-signed.der and /dev/null differ
diff --git a/tests/040-pem/bad.isrg-root-x1-cross-signed.der.b64 b/tests/040-pem/bad.isrg-root-x1-cross-signed.der.b64
new file mode 100644
index 0000000..f9d7e5b
--- /dev/null
+++ b/tests/040-pem/bad.isrg-root-x1-cross-signed.der.b64
@@ -0,0 +1,25 @@
+MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/MSQwIgYDVQQK
+ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
+DTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1owTzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIElu
+dGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIi
+MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B4
+93XCov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpLwYqGcWlK
+ZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+DLtFJV4yAdLbaL9A4jXsD
+cCEbdfIwP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WioW5WlHAQU7G75K/QosMr
+AdSW9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuGWCLKTVXk
+cGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9Ohe8Y4IWS6wY7bCkjCWDc
+RQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFCDfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr
+6GtPAQw4dy753ec5
diff --git a/tests/040-pem/run.sh b/tests/040-pem/run.sh
index 7ad8ad3..1d4d1f4 100755
--- a/tests/040-pem/run.sh
+++ b/tests/040-pem/run.sh
@@ -1,13 +1,16 @@
 #!/bin/bash -e
 
 cd "$tmpdir"
+cp -p "$srcdir"/040-pem/bad.* $tmpdir
+base64 -d < "$tmpdir"/bad.isrg-root-x1-cross-signed.der.b64 > "$tmpdir"/bad.isrg-root-x1-cross-signed.der
+rm -f "$tmpdir"/bad.isrg-root-x1-cross-signed.der.b64
 
 for good in "$srcdir"/040-pem/good.* ; do
 	if ! "$toolsdir"/pem "$good" ; then
 		exit 1
 	fi
 done
-for bad in "$srcdir"/040-pem/bad.* bad.notfound; do
+for bad in "$tmpdir"/bad.* bad.notfound; do
 	if "$toolsdir"/pem "$bad" > /dev/null; then
 		echo unexpected success with `basename "$bad"`
 		exit 1

From 9880d59108c05c84b4df9b8214edd14e64838851 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Mar 17 2022 20:47:32 +0000
Subject: [PATCH 2/3] Correct a bad date in the spec changelog


Signed-off-by: Rob Crittenden <rcritten@redhat.com>

---

diff --git a/certmonger.spec b/certmonger.spec
index d97b830..9a95b22 100644
--- a/certmonger.spec
+++ b/certmonger.spec
@@ -285,7 +285,7 @@ exit 0
   - Reject a certificate with an empty NSS nickname
   - Add SCEP config option to treat the challenge password as an OTP
 
-* Tue Jun 14 2021 Rob Crittenden <rcritten@redhat.com> - 0.79.14-1
+* Tue Jun 15 2021 Rob Crittenden <rcritten@redhat.com> - 0.79.14-1
 - update to 0.79.14
   -  Fix local CA to work under FIPS
   -  Translated using Weblate (Portuguese (Brazil))

From a80b8aaef8300bb48d218d5cbaa4d6882bba49f3 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Mar 17 2022 21:31:05 +0000
Subject: [PATCH 3/3] Switch to https URLs for Sources, etc.


Signed-off-by: Rob Crittenden <rcritten@redhat.com>

---

diff --git a/certmonger.spec b/certmonger.spec
index 9a95b22..02b0c3c 100644
--- a/certmonger.spec
+++ b/certmonger.spec
@@ -33,9 +33,9 @@ Summary:	Certificate status monitor and PKI enrollment client
 
 Group:		System Environment/Daemons
 License:	GPLv3+
-URL:		http://pagure.io/certmonger/
-Source0:	http://releases.pagure.org/certmonger/certmonger-%{version}.tar.gz
-#Source1:	http://releases.pagure.org/certmonger/certmonger-%%{version}.tar.gz.sig
+URL:		https://pagure.io/certmonger/
+Source0:	https://releases.pagure.org/certmonger/certmonger-%{version}.tar.gz
+#Source1:	https://releases.pagure.org/certmonger/certmonger-%%{version}.tar.gz.sig
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:	openldap-devel

