Initial commit

This commit is contained in:
Tobias Herre 2023-11-01 00:31:26 +01:00
parent d80dc73607
commit 026f626dbe
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/sh
#!/bin/sh
# Check for the presence of the certificate file
if [ ! -f "$1" ]; then
exit 0
fi
# Extract subjectAltName from the certificate
openssl x509 -in "$1" -text -noout | grep -E -o "DNS:[^,]*" | sed 's/DNS://g' | tr -d ' ' | tr ',' ' ' | sort | tr '\n' ' '