Skip to content

Instantly share code, notes, and snippets.

@Da-Juan
Created June 24, 2021 15:00
Show Gist options
  • Save Da-Juan/29cd410ebb57b739e5cf5abec783f4be to your computer and use it in GitHub Desktop.
Save Da-Juan/29cd410ebb57b739e5cf5abec783f4be to your computer and use it in GitHub Desktop.
Get certificates validity dates for a list of domains
#!/usr/bin/env bash
#
# Get certificates validity dates for a list of domains
#
while read -r domain; do
echo "$domain"
echo | openssl s_client -connect "$domain":443 -status 2>&1 | openssl x509 -dates -noout
done < domains
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment