Check password protected certificate expiration date with OpenSSL

PKS
openssl pkcs12 -passin pass:{{cert_password}} \
-passout pass:{{cert_password}} -in certificate.p12 \
-out /dev/stdout | openssl x509 -in /dev/stdin -noout -enddate
X509
openssl x509 -in certificate.crt -noout -enddate