[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to find type of cert?

Posted on 2011-02-16
3
Medium Priority
?
398 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 2000 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

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 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