Certificates 101

To view the details of a certificate:

openssl x509 -in <certificate.cer> -text

To view the details of cacerts file:

keytool -list -keystore <cacerts>

To view the details of a specific certificate included in a cacerts file:

keytool -list -v -keystore <cacerts> -alias "<alias>"

To export, in a der format, a certificate from a cacerts file:

keytool -export -keystore <cacerts> -alias "<alias>" -file <certificate.der>

To convert a certificate from a der format into a pem format:

 openssl x509 -inform der -in <certificate.der> -out <certificate.cer>

To generate a concatenate certificate chain:

cat certificate.cer intermediate.cer root.cer >combiner.cer
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s