summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon Rettberg2024-02-26 17:06:38 +0100
committerSimon Rettberg2024-02-26 17:06:38 +0100
commit3d7e9e62d10a170316ac348b65a1569058ddcb4f (patch)
treecf0943d04ba42eed347f43e90c58057aeb5b8d13 /scripts
parent[PortScan] Check for fingerprint attribute case-insensitive (diff)
downloadtmlite-bwlp-3d7e9e62d10a170316ac348b65a1569058ddcb4f.tar.gz
tmlite-bwlp-3d7e9e62d10a170316ac348b65a1569058ddcb4f.tar.xz
tmlite-bwlp-3d7e9e62d10a170316ac348b65a1569058ddcb4f.zip
[InstallHttps] Include chain in main pem for lighttpd
Separate chain file never worked...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-https10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/install-https b/scripts/install-https
index dd7b1db..143638e 100755
--- a/scripts/install-https
+++ b/scripts/install-https
@@ -45,15 +45,17 @@ op_import ()
# Create server.pem
{
cat "$C"
+ # If we have a chainfile, try to use it aswell
+ if [ -s "$CHAIN" ] && openssl x509 -noout -hash -in "$CHAIN" &> /dev/null \
+ && [ "$( grep -c '^-----END' "$CHAIN" )" = "$( grep -c '^-----BEGIN' "$CHAIN" )" ]; then
+ echo
+ cat "$CHAIN"
+ fi
echo
cat "$K"
} > "$CERT_KEY_FILE"
chmod 0600 "$CERT_KEY_FILE" || exit 4
rm -f -- "$C" "$K"
- # If we have a chainfile, try to use it aswell
- if [ -s "$CHAIN" ]; then
- openssl x509 -noout -hash -in "$CHAIN" >/dev/null 2>&1 && cp "$CHAIN" "$CHAIN_FILE"
- fi
post_setup_hook
return 0
}