开发者

Certificate encodings with X509Certificates and keytool

开发者 https://www.devze.com 2023-02-14 23:17 出处:网络
I am looking into X509Certificates and keytool and I am confused on the following: A c开发者_C百科ertificate can be stored in cer (Canonical Encoding Rules) format as well as in DER?

I am looking into X509Certificates and keytool and I am confused on the following:

A c开发者_C百科ertificate can be stored in cer (Canonical Encoding Rules) format as well as in DER?

I am reviewing various tutorials by SUN on keytool and in some cases they seem to import a certificate ending in ".cer" or exporting one with the extension ".cer".

E.g.

keytool -importcert -alias abc -file ABCCA.cer  OR  
keytool -exportcert -alias mykey -file MJ.cer

Does this mean cer encoding?Because initially I had the impresion that if you do an export on keytool the default is der.

Or is cer and der interchangeable?

Thanks


By default, keytool exports using DER ("Distinguished Encoding Rules"), a common binary encoding for X509 certificates.

It's just an unfortunate coincidence that CER is the name of another ASN.1 encoding, as well as being the first three letters of "certificate"...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号