rahul
rahul

Reputation: 187090

Identifying whether a certificate is der encoded or base 64 encoded

Is there a way by which I can know the encoding type of a certicate file?

Upvotes: 13

Views: 25513

Answers (2)

AppleStock
AppleStock

Reputation: 21

Informational since this got a search hit - All X.509 certs pretty much use Distinguished Encoding Rules (DER) as the defacto encoding standard to store certificate data in Abstract Syntax Notation One (ASN.1). Base64 is a form of binary-to-text encoding (usually in ASCII text). This makes it "transmission" friendly.

Ref: http://www.herongyang.com/Cryptography/Certificate-Format-DER-Distinguished-Encoding-Rules.html

https://support.ssl.com/Knowledgebase/Article/View/19/0/der-vs-crt-vs-cer-vs-pem-certificates-and-how-to-convert-them

Upvotes: 2

sipsorcery
sipsorcery

Reputation: 30714

If you open the certificate up in notepad and it starts with -----BEGIN CERTIFICATE----- then it's Base64 encoded. if it's all goobledygook it's DER encoded.

Upvotes: 22

Related Questions