A PKCS12 file, which has an extension of .pfx, contains a certificate (CA-issued certificate or self-signed certificate) and a corresponding private key.
Getting the certificate expiration date is a two step process :
Convert the .pfx file to .pem
Get the expiration/enddate of the pem file.
There might be better ways to do this, but below is what I came up with while working with a friend today.
1 2 3 4 5