Interview Prep/Linux/Rapid-Fire Commands

Check when a TLS certificate on a remote server expires.

IntermediateProductionRapid-Fire Commands
Answer
echo | openssl s_client -connect api.example.com:443 -servername api.example.com 2>/dev/null \
  | openssl x509 -noout -enddate -subject
openssl x509 -in /etc/ssl/certs/app.pem -noout -checkend 2592000   # expires within 30 days?
All Linux questions Roadmap: Linux

More on Rapid-Fire Commands