Skip to content

Instantly share code, notes, and snippets.

@agargiulo
Created December 31, 2020 05:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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