|
|
d738b9 |
From 7113cdfa8b06d1f2a9512a1a69c5313a79509298 Mon Sep 17 00:00:00 2001
|
|
|
d738b9 |
From: Greg Hudson <ghudson@mit.edu>
|
|
|
d738b9 |
Date: Wed, 6 Sep 2017 12:56:37 -0400
|
|
|
d738b9 |
Subject: [PATCH] Fix make-certs.sh for OpenSSL 1.1
|
|
|
d738b9 |
|
|
|
d738b9 |
The openssl req commands in make-certs.sh contain -subj options which
|
|
|
d738b9 |
were ignored in favor of the config file prior to OpenSSL 1.1. When
|
|
|
d738b9 |
they are used, they remove elements of the subject which are now
|
|
|
d738b9 |
required by t_pkinit.py.
|
|
|
d738b9 |
|
|
|
d738b9 |
(cherry picked from commit b0473da67d72e43b9f03b703869069348e872efc)
|
|
|
d738b9 |
[rharwood@redhat.com: remove newer sections in make-certs.sh]
|
|
|
d738b9 |
---
|
|
|
d738b9 |
src/tests/dejagnu/pkinit-certs/make-certs.sh | 19 +++++++++----------
|
|
|
d738b9 |
1 file changed, 9 insertions(+), 10 deletions(-)
|
|
|
d738b9 |
|
|
|
d738b9 |
diff --git a/src/tests/dejagnu/pkinit-certs/make-certs.sh b/src/tests/dejagnu/pkinit-certs/make-certs.sh
|
|
|
d738b9 |
index 0f07709b0..0d8c2019a 100755
|
|
|
d738b9 |
--- a/src/tests/dejagnu/pkinit-certs/make-certs.sh
|
|
|
d738b9 |
+++ b/src/tests/dejagnu/pkinit-certs/make-certs.sh
|
|
|
d738b9 |
@@ -122,15 +122,14 @@ SUBJECT=ca openssl req -config openssl.cnf -new -x509 -extensions exts_ca \
|
|
|
d738b9 |
-set_serial 1 -days $DAYS -key privkey.pem -out ca.pem
|
|
|
d738b9 |
|
|
|
d738b9 |
# Generate a KDC certificate.
|
|
|
d738b9 |
-SUBJECT=kdc openssl req -config openssl.cnf -new -subj /CN=kdc \
|
|
|
d738b9 |
- -key privkey.pem -out kdc.csr
|
|
|
d738b9 |
+SUBJECT=kdc openssl req -config openssl.cnf -new -key privkey.pem -out kdc.csr
|
|
|
d738b9 |
SUBJECT=kdc openssl x509 -extfile openssl.cnf -extensions exts_kdc \
|
|
|
d738b9 |
-set_serial 2 -days $DAYS -req -CA ca.pem -CAkey privkey.pem \
|
|
|
d738b9 |
-out kdc.pem -in kdc.csr
|
|
|
d738b9 |
|
|
|
d738b9 |
# Generate a client certificate and PKCS#12 bundles.
|
|
|
d738b9 |
-SUBJECT=user openssl req -config openssl.cnf -new -subj /CN=user \
|
|
|
d738b9 |
- -key privkey.pem -out user.csr
|
|
|
d738b9 |
+SUBJECT=user openssl req -config openssl.cnf -new -key privkey.pem \
|
|
|
d738b9 |
+ -out user.csr
|
|
|
d738b9 |
SUBJECT=user openssl x509 -extfile openssl.cnf -extensions exts_client \
|
|
|
d738b9 |
-set_serial 3 -days $DAYS -req -CA ca.pem -CAkey privkey.pem \
|
|
|
d738b9 |
-out user.pem -in user.csr
|
|
|
d738b9 |
@@ -140,24 +139,24 @@ openssl pkcs12 -export -in user.pem -inkey privkey.pem -out user-enc.p12 \
|
|
|
d738b9 |
-passout pass:encrypted
|
|
|
d738b9 |
|
|
|
d738b9 |
# Generate a client certificate and PKCS#12 bundles with a UPN SAN.
|
|
|
d738b9 |
-SUBJECT=user openssl req -config openssl.cnf -new -subj /CN=user \
|
|
|
d738b9 |
- -key privkey.pem -out user-upn.csr
|
|
|
d738b9 |
+SUBJECT=user openssl req -config openssl.cnf -new -key privkey.pem \
|
|
|
d738b9 |
+ -out user-upn.csr
|
|
|
d738b9 |
SUBJECT=user openssl x509 -extfile openssl.cnf -extensions exts_upn_client \
|
|
|
d738b9 |
-set_serial 4 -days $DAYS -req -CA ca.pem -CAkey privkey.pem \
|
|
|
d738b9 |
-out user-upn.pem -in user-upn.csr
|
|
|
d738b9 |
openssl pkcs12 -export -in user-upn.pem -inkey privkey.pem -out user-upn.p12 \
|
|
|
d738b9 |
-passout pass:
|
|
|
d738b9 |
|
|
|
d738b9 |
-SUBJECT=user openssl req -config openssl.cnf -new -subj /CN=user \
|
|
|
d738b9 |
- -key privkey.pem -out user-upn2.csr
|
|
|
d738b9 |
+SUBJECT=user openssl req -config openssl.cnf -new -key privkey.pem \
|
|
|
d738b9 |
+ -out user-upn2.csr
|
|
|
d738b9 |
SUBJECT=user openssl x509 -extfile openssl.cnf -extensions exts_upn2_client \
|
|
|
d738b9 |
-set_serial 5 -days $DAYS -req -CA ca.pem -CAkey privkey.pem \
|
|
|
d738b9 |
-out user-upn2.pem -in user-upn2.csr
|
|
|
d738b9 |
openssl pkcs12 -export -in user-upn2.pem -inkey privkey.pem \
|
|
|
d738b9 |
-out user-upn2.p12 -passout pass:
|
|
|
d738b9 |
|
|
|
d738b9 |
-SUBJECT=user openssl req -config openssl.cnf -new -subj /CN=user \
|
|
|
d738b9 |
- -key privkey.pem -out user-upn3.csr
|
|
|
d738b9 |
+SUBJECT=user openssl req -config openssl.cnf -new -key privkey.pem \
|
|
|
d738b9 |
+ -out user-upn3.csr
|
|
|
d738b9 |
SUBJECT=user openssl x509 -extfile openssl.cnf -extensions exts_upn3_client \
|
|
|
d738b9 |
-set_serial 6 -days $DAYS -req -CA ca.pem -CAkey privkey.pem \
|
|
|
d738b9 |
-out user-upn3.pem -in user-upn3.csr
|