mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Add script to retrieve SSL certificates with s_client.
This commit is contained in:
8
dotfiles/zshrc.d/ssl.zsh
Normal file
8
dotfiles/zshrc.d/ssl.zsh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
retrieve_ssl_certificate_chain() {
|
||||||
|
openssl s_client -connect $1 -showcerts < /dev/null | awk \
|
||||||
|
' BEGIN { incert = 0 }
|
||||||
|
/-----BEGIN CERTIFICATE-----/ { incert = 1 }
|
||||||
|
incert == 1 { print $0 }
|
||||||
|
/-----END CERTIFICATE-----/ { incert = 0 }
|
||||||
|
' 2>/dev/null
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user