diff options
author | Thomas Lange <code@nerdmind.de> | 2016-12-19 04:19:23 +0100 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2016-12-19 04:19:23 +0100 |
commit | c24b4bbe90eda4942932c1edbed9a242fcc72380 (patch) | |
tree | 3595f699d1c239b5949c505d43d70e52c57a20e9 | |
parent | 401a7b31e348814b4529d342d2fe920d28d63bb4 (diff) | |
download | painlessle-c24b4bbe90eda4942932c1edbed9a242fcc72380.tar.gz painlessle-c24b4bbe90eda4942932c1edbed9a242fcc72380.tar.xz painlessle-c24b4bbe90eda4942932c1edbed9a242fcc72380.zip |
Added OPENSSLCONF variable which contains the path to the openssl.cnf file.
-rwxr-xr-x | painless-le.sh | 3 |
1 files changed, 2 insertions, 1 deletions
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 "/" #=============================================================================== |