- to check validity
openssl s_client -connect google.com:443 2>/dev/null | openssl x509 -noout -text | grep -A3 "Validity";
- check details
openssl x509 -in cert.pem -text -noout
- more suitable
openssl x509 -in ca.crt -issuer -subject -noout -dates
more: https://www.sslshopper.com/article-most-common-openssl-commands.html