Skip to content

Commit 6b934c0

Browse files
committed
Generating temporary chain and key
1 parent 67e976d commit 6b934c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

overlay/etc/ssl/inc/setup-ssl.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ generate_temp_cert () {
1313
-sha256 \
1414
-days 3650 \
1515
-nodes \
16-
-out ${1}/fullchain.crt \
17-
-keyout ${1}.key \
18-
-subj "/C=NA/ST=NA/L=NA/O=NA/OU=NA/CN=${2}"
16+
-out ${1} \
17+
-keyout ${2} \
18+
-subj "/C=NA/ST=NA/L=NA/O=NA/OU=NA/CN=${3}"
1919

2020
}
2121

@@ -43,7 +43,6 @@ setup_ssl () {
4343
# set default values
4444
local SANS=$(printf ",%s" ${DOMAIN_ALIASES[@]})
4545
local CERT=${SSL_CERTS}/${DOMAIN_NAME}
46-
local FULLCHAIN=${CERT}/fullchain
4746
local ACL_DIR="'${WWW_ACME_CHALLENGE}'"
4847
local ACL_RPT=$((${#DOMAIN_ALIASES[@]} + 1))
4948
local ACL=$(yes ${ACL_DIR} | head -n ${ACL_RPT} | sed -n 'H;${x;s/\n/ /gp}')
@@ -55,6 +54,7 @@ setup_ssl () {
5554
replace_d "ACL" "(${ACL})" ${FILE}
5655

5756
# create self-signed certificate so nginx will start before we request proper certificates
58-
generate_temp_cert ${CERT} ${DOMAIN_NAME}
57+
generate_temp_cert ${CERT}/fullchain.crt ${CERT}.key ${DOMAIN_NAME}
58+
generate_temp_cert ${CERT}/chain.crt ${CERT}/chain.key ${DOMAIN_NAME}
5959

6060
}

0 commit comments

Comments
 (0)