Created
December 31, 2020 05:53
-
-
Save agargiulo/845edcf95ca3070fd82b1bd4a1553652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ssl_dates () { | |
local rem_host="${1}" | |
local rem_port="${2:-443}" | |
[[ -n $rem_host ]] || { | |
echo 'USAGE: ssl_dates host.example.com [8443]' && return 1 | |
} | |
echo '' | openssl s_client -servername "${rem_host}" -showcerts -connect "${rem_host}:${rem_port}" | openssl x509 -noout -dates | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment