Solved

How to find type of cert?

Posted on 2011-02-16
3
393 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 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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