mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +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
|
fi
|
||||||
}
|
}
|
||||||
alias ext=extract
|
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