Blame SOURCES/Add-test-cert-with-no-extensions.patch

d738b9
From 728d567d1c7445e89edad046d8aac5344143d51d Mon Sep 17 00:00:00 2001
d738b9
From: Greg Hudson <ghudson@mit.edu>
d738b9
Date: Thu, 5 Oct 2017 12:54:13 -0400
d738b9
Subject: [PATCH] Add test cert with no extensions
d738b9
d738b9
Add commands to make-certs.sh to generate a test client certificate
d738b9
with no certificate extensions.  Re-run make-certs.sh.
d738b9
d738b9
ticket: 8562
d738b9
(cherry-picked from commit 0d23835660ab131d244d395e4568969b5c0dc678)
d738b9
[rharwood@redhat.com: only backport the make-certs.sh changes]
d738b9
---
d738b9
 src/tests/dejagnu/pkinit-certs/make-certs.sh | 9 +++++++++
d738b9
 1 file changed, 9 insertions(+)
d738b9
d738b9
diff --git a/src/tests/dejagnu/pkinit-certs/make-certs.sh b/src/tests/dejagnu/pkinit-certs/make-certs.sh
d738b9
index 0d8c2019a..23426af8a 100755
d738b9
--- a/src/tests/dejagnu/pkinit-certs/make-certs.sh
d738b9
+++ b/src/tests/dejagnu/pkinit-certs/make-certs.sh
d738b9
@@ -163,5 +163,14 @@ SUBJECT=user openssl x509 -extfile openssl.cnf -extensions exts_upn3_client \
d738b9
 openssl pkcs12 -export -in user-upn3.pem -inkey privkey.pem \
d738b9
      -out user-upn3.p12 -passout pass:
d738b9
 
d738b9
+# Generate a client certificate and PKCS#12 bundle with no PKINIT extensions.
d738b9
+SUBJECT=user openssl req -config openssl.cnf -new -subj /CN=user \
d738b9
+    -key privkey.pem -out generic.csr
d738b9
+SUBJECT=user openssl x509 -set_serial 7 -days $DAYS -req -CA ca.pem \
d738b9
+    -CAkey privkey.pem -out generic.pem -in generic.csr
d738b9
+openssl pkcs12 -export -in generic.pem -inkey privkey.pem -out generic.p12 \
d738b9
+    -passout pass:
d738b9
+
d738b9
 # Clean up.
d738b9
 rm -f openssl.cnf kdc.csr user.csr user-upn.csr user-upn2.csr user-upn3.csr
d738b9
+rm -f generic.csr