I am using Windows and have been given a .cer file. How can I view the details of it?

link|improve this question

69% accept rate
feedback

2 Answers

up vote 4 down vote accepted

OpenSSL will allow you to look at it if its installed on your system.

openssl x509 -in cerfile.cer -noout -text

The format of the .CER file might require that you specify a different encoding format to be explicitly called out.

openssl x509 -inform pem -in cerfile.cer -noout -text

or

openssl x509 -inform der -in cerfile.cer -noout -text

On Windows systems you can right click the .cer file and select Open. That will then let you view most of the meta data.

link|improve this answer
I get "4726:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:632:Expecting: TRUSTED CERTIFICATE" when I do this in Linux – Zubair Dec 23 '10 at 9:51
What you mentioned about Windows works though, but is very hard to read the certificate details in the little window that is displayed – Zubair Dec 23 '10 at 9:54
I've added some clarifications on some OpenSSL options to specify different encoding formats - given your error specifying DER format looks like it would work. – Helvick Dec 23 '10 at 10:31
Thanks, "openssl x509 -inform der -in cerfile.cer -noout -text" worked! – Zubair Dec 23 '10 at 12:25
feedback

Here is all you need to know: http://shib.kuleuven.be/docs/ssl_commands.shtml

If none is working, than must be the openssl installation or the cer file.

HTH

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.