From 39dff75de97898881a5775addadc379d689234c4 Mon Sep 17 00:00:00 2001 From: Someone Date: Tue, 1 Sep 2015 00:35:25 +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