Solved

How to find type of cert?

Posted on 2011-02-16
3
387 Views
Last Modified: 2012-05-11
I have a file without extension, Using openssl command how can I find whether it is p12, der, cer, pem csr?? Kindly let me know if there is a way to find it. Thanks!
0
Comment
Question by:beer9
3 Comments
 
LVL 4

Expert Comment

by:florjan
ID: 34914096
.pem is private key that you should keep safe
.csr is certificate signing request
.cer is certificate
0
 
LVL 2

Accepted Solution

by:
nimda7 earned 500 total points
ID: 34914203
try this:
head <filename>
if output  like
-----BEGIN CERTIFICATE-----                                                                      
MIIEGDCCAwCgAwIBAgIBATANBgk..
.and some HEX
it's a CER/CRT/PEM

if output  like
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA22HoOSyXVvUcJ8G4
.and some HEX
it's a KEY

if output  like
-----BEGIN CERTIFICATE REQUEST-----                                            
MIICrjCCAZYCAQAwaTELMAkGA1UEBhMCVVMxCzA
.and some HEX
it's a CSR

If You get some bougus - try this
openssl x509 -inform DER -in <filename> -noout -text
if it's get readable output about certificate - it's in DER format

or
openssl pkcs12 -in <filename> -info -noout
in this case - if file is a p12 - You may be prompted for password. If so - type correct password for this file and gets come info about it
0
 

Author Closing Comment

by:beer9
ID: 34944258
Thank you! :-)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

We've all had that page pop up telling us there is a problem with the certificate and some of us continue on anyways and others run away to a safer competing site.  But what to do when you get the error - is it your problem or theirs?  What can you …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now