openssl command to check certificate expiry code example
Example: script to get pem expiration date
$ openssl pkcs12 -in mycert.p12 -nodes | openssl x509 -noout -enddate
$ openssl pkcs12 -in mycert.p12 -nodes | openssl x509 -noout -enddate