Skip to content

Instantly share code, notes, and snippets.

@luc-tielen
Created February 9, 2026 08:26
Show Gist options
  • Select an option

  • Save luc-tielen/6df1aa38076376f141d6c202521b5a22 to your computer and use it in GitHub Desktop.

Select an option

Save luc-tielen/6df1aa38076376f141d6c202521b5a22 to your computer and use it in GitHub Desktop.
Certificate expiration script
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <domain>" >&2
exit 1
fi
DOMAIN="$1"
echo \
| openssl s_client -servername "${DOMAIN}" -connect "${DOMAIN}":443 2> /dev/null \
| openssl x509 -noout -dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment