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