From ecaba79b0f7d5651a98ff2c994f5ca1315cc9d72 Mon Sep 17 00:00:00 2001 From: Someone Date: Tue, 1 Sep 2015 00:34:10 +0200 Subject: [PATCH] Allow spaces in CA-cert subject too. (Suggested by Astra) --- certgen.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certgen.sh b/certgen.sh index e8bea0e..c15ea89 100755 --- a/certgen.sh +++ b/certgen.sh @@ -36,7 +36,8 @@ while read cdline ; do mkdir -m 0700 certs crl newcerts touch index.txt export CA_PATH="./" - openssl req -batch -new -x509 -newkey rsa:4096 -keyout ca.key -out ca.crt -nodes -subj "${certdata[2]}" -reqexts v3_ca_req -config "${MYPWD}/openssl.cnf" -days 3650 &>/dev/null + SUBJECT=$(echo -n "${certdata[2]}" | sed -e 's/_/ /g') + openssl req -batch -new -x509 -newkey rsa:4096 -keyout ca.key -out ca.crt -nodes -subj "${SUBJECT}" -reqexts v3_ca_req -config "${MYPWD}/openssl.cnf" -days 3650 &>/dev/null continue fi -- 2.43.0