?
Solved

How to find type of cert?

Posted on 2011-02-16
3
Medium Priority
?
395 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

So you need a certificate so you can offer SSL encryption.  But which one should you get?  There are so many choices out there! Here is a generic overview of the main types of SSL certificates sold by the majority of commercial Certification Auth…
Imagine a situation that you have installed SSL (http://en.wikipedia.org/wiki/Secure_Sockets_Layer) Certificate on your Cisco ASA (Cisco Adaptive Security Appliance) firewall. Installation of SSL certificate on ASA is an another topic for which you …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

752 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