From fa5526a44bc956ed6473c2316519225f0dad9dfd Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Tue, 28 Dec 2021 18:31:01 +0100 Subject: [PATCH] Add a warning to ./unrealircd spkifp about it using the default certificate locations, and inform the user that they can specify a file. This doesn't solve https://bugs.unrealircd.org/view.php?id=6021 completely but at least makes the user aware of this. Reported by arcanefeenix and crazycat. --- unrealircd.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unrealircd.in b/unrealircd.in index 3df2d3b13..8c5cbaadb 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -227,9 +227,15 @@ elif [ "$1" = "spki" -o "$1" = "spkifp" ] ; then CERT="@CONFDIR@/tls/server.cert.pem" if [ "$2" != "" ]; then CERT="$2" + else + echo "NOTE: This script uses the default certificate location (any set::tls settings" + echo "are ignored). If this is not what you want then specify a certificate" + echo "explicitly like this: ./unrealircd spkifp conf/tls/example.pem" + echo "" fi if [ ! -f "$CERT" ]; then echo "Could not open certificate: $CERT" + echo "You can specify a certificate like this: ./unrealircd spkifp conf/tls/example.pem" exit 1 fi openssl x509 -noout -in "$CERT" -pubkey | openssl asn1parse -noout -inform pem -out @TMPDIR@/tmp.public.key