Examples of x509 certificate handling

We all want to read the documentation, but are lazy to actually sit and read them.

I find my self googling for examples most of the time, so here in this blog let’s put together a few examples about x509 certificate handling.

Viewing the Certificate

## To view a x509 certificate from a DER format file

openssl x509 -inform DER -in /tmp/x509cert -text -noout

Parsing the certificate

## To parse a asn1 format certificate from a der format file

openssl asn1parse -inform DER -in /tmp/x509cert

Converting from DER to PEM format

## From DER format to PEMopenssl rsa -pubin -inform DER -in key.pub.bin -outform PEM -out key.pub.pem

Credits

--

--