diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-07-17 15:57:00 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-07-17 15:57:30 -0400 |
commit | 1080bca44e1e0fa88b0ddde9d21d2fae72b935dc (patch) | |
tree | ca3dcecff3021cd48766f65a65670f73ce0f8433 | |
parent | 5569841db1118e3795f261668fb6ba6125641a16 (diff) | |
download | conf-1080bca44e1e0fa88b0ddde9d21d2fae72b935dc.tar.gz conf-1080bca44e1e0fa88b0ddde9d21d2fae72b935dc.zip |
alias to view a server's tls cert
-rw-r--r-- | aliases | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -167,6 +167,9 @@ function 2fa_github { function 2fa_dynadot { oathtool --totp -b $(pass show websites/dynadot/doy | grep '^2fa:' | sed 's/^2fa: //') } +function hostcert { + openssl s_client -connect "$1" < /dev/null 2>/dev/null | perl -nle 'print if /BEGIN CERTIFICATE/../END CERTIFICATE/' | openssl x509 -text | perl -nle 'print unless /BEGIN CERTIFICATE/../END CERTIFICATE/' +} # }}} # vim:ft=sh: |