feat(zsh/aliases): add root-ca shell function to print root CA certs for domains

This commit is contained in:
Jim Myhrberg
2024-05-09 09:28:11 +01:00
parent bab3b33c97
commit f0c38533f5

View File

@@ -101,3 +101,13 @@ extract() {
fi
}
alias ext=extract
root-ca() {
local hostname="$1"
local port="${2:-443}"
echo |
openssl s_client \
-servername "$hostname" \
-connect "${hostname}:${port}" 2> /dev/null |
openssl x509 -noout -text
}