Solved

How to find type of cert?

Posted on 2011-02-16
3
390 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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