From c24b4bbe90eda4942932c1edbed9a242fcc72380 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 19 Dec 2016 04:19:23 +0100 Subject: Added OPENSSLCONF variable which contains the path to the openssl.cnf file. --- painless-le.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/painless-le.sh b/painless-le.sh index 31dc897..f36a3a8 100755 --- a/painless-le.sh +++ b/painless-le.sh @@ -33,6 +33,7 @@ LETSENCRYPT_ENDPOINT="https://acme-v01.api.letsencrypt.org/directory" #=============================================================================== # Define required paths #=============================================================================== + OPENSSLCONF="/etc/ssl/openssl.cnf" REQUESTFILE=`mktemp -u /tmp/letsencrypt.XXXX.csr` CONFIDENTIAL="${ARGUMENT_DIRECTORY%/}/confidential.pem" INTERMEDIATE="${ARGUMENT_DIRECTORY%/}/intermediate.pem" @@ -42,7 +43,7 @@ CERTIFICATE_FULL="${ARGUMENT_DIRECTORY%/}/certificate_full.pem" #=============================================================================== # Generate Certificate-Signing-Request (CSR) #=============================================================================== -openssl req -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=${ARGUMENT_HOSTNAMES}")) \ +openssl req -config <(cat "${OPENSSLCONF}" <(printf "[SAN]\nsubjectAltName=${ARGUMENT_HOSTNAMES}")) \ -new -sha256 -key "${CONFIDENTIAL}" -out "${REQUESTFILE}" -outform der -reqexts SAN -subj "/" #=============================================================================== -- cgit v1.2.3