mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 10:06:40 +00:00
feat(zsh/aliases): add root-ca shell function to print root CA certs for domains
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user