First thing to do is to convert the p12 file (PKCS12 format) to X509 format, to do so we use the openssl command.
$ openssl pkcs12 -in maka.p12 -info
When prompted enter the password. Now is the content printed out, find out which CN (Common Name) that is for the server, typically it is the dns name of the server. After located the certificate then copy everything between the below start and end tag,
-----BEGIN CERTIFICATE-----
The content to copy...
-----END CERTIFICATE-----
Past the copied content into a file with prefix .crt. If you were on a Windows system you could now simple double click the crt-file and the information of the certification would be display, but here we will continue using openssl. To use openssl, use the below command using the file name of the file you pasted the certificate into.
$ openssl x509 -in <your_file.crt> -inform PEM -text
Now is the expiration date printed among other information.
No comments:
Post a Comment