December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Openssl Howto for Apache

 

Display Certificate Subject name in readable format

openssl x509 -in CERTIFICATE_FILE -noout -subject -nameopt multiline,-lname,-align

Top

To verify a certificate chain

openssl verify CERTIFICATE_FILE

 

The file CERTIFICATE_FILE contain the intermediate certificate first and the servers certificate.

Check your Certificate using the Certificate Check tool at the bottom of the page

Top

To view a PKCS#12 file using openssl command

openssl pkcs12 -in CertName.p12

A PKCS#14 file contains the certificate, private key and all the intermediate certificate’s in a certificate chain and is encrypted with a password.

Alternatively use PKCS12 view Tool

Top

Convert PKCS#12 file to pem format using openssl command

openssl x509 -inform der -in certname.p12 -out convertedfile

Top

To view PKCS#7 files using openssl command

The PKCS #7 format enables the transfer of a certificate and all the certificates in its certification path from one computer to another, or from a computer to removable media. PKCS #7 files typically use the .p7b extension, and are compatible with the ITU-T X.509 standard

openssl pkcs7 -in filename_containing_cert -print_certs -out cert.pem

Top

Convert a PKCS#7 file from PEM to DER using openssl command

command: openssl pkcs7 -in filename_containing_cert -outform DER -out file.der

Top

Convert a DER formatted certificate to PEM using openssl command

openssl x509 -inform der -in certificate_file -outform pem -out newfilename.pem

To view the Der formatted file (*.crt, *.cer, *.der)
openssl x509 -inform der -in certificate_file -text Top

Display Certificate Thumbprint

To display certificate thumbprint using open source software namely openssl

1. openssl x509 -in CERTIFICATE_FILE -noout -sha1 -fingerprint
2. openssl x509 -in CERTIFICATE_FILE -noout -fingerprint

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>