Is there a utility that is available in standard windows 7 installations, that allows me to convert DER-encoded certificates to PEM-encoded certificates or shows me the ASN.1 text of a DER-encoded certificate?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Not exactly an "utility", but you can import PEM certificates into Windows Certificate Store and export them back as DER.

In fact, Windows supports PEM-encoded certificates just fine, it just doesn't recognize the .pem extension – you can rename the file to name.crt or name.cer, then you can open it and see all information.

"PEM encoded" means nothing more than Base64-encoded DER, between "begin"/"end" headers. You can use any Base64 decoder for this.

For example, PowerShell has [System.Convert]::FromBase64String($str)...


You can also use OpenSSL for Windows:

openssl x509 -in foo.pem -out foo.der -outform der
openssl asn1parse -in foo.pem
openssl asn1parse -in foo.der -inform der

or this online ASN.1 decoder.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.