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

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