【问题标题】:Identifying whether a certificate is der encoded or base 64 encoded识别证书是 der 编码还是 base 64 编码
【发布时间】:2010-10-14 01:35:52
【问题描述】:

有没有办法知道证书文件的编码类型?

【问题讨论】:

    标签: security encoding base64 certificate x509


    【解决方案1】:

    提供信息,因为这得到了搜索 - 所有 X.509 证书几乎都使用可分辨编码规则 (DER) 作为事实上的编码标准,以抽象语法表示法一 (ASN.1) 存储证书数据。 Base64 是一种二进制到文本编码的形式(通常是 ASCII 文本)。这使其“传输”友好。

    参考: 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

    【讨论】:

      【解决方案2】:

      如果您在记事本中打开证书并且它以 -----BEGIN CERTIFICATE----- 开头,那么它是 Base64 编码的。如果全是 goobledygook,它是 DER 编码的。

      【讨论】:

      • 当你选错了! PEM 到 DER:openssl x509 -in cert.crt -outform der -out cert.der DER 到 PEM:openssl x509 -in cert.crt -inform der -outform pem -out cert.pem
      猜你喜欢
      • 1970-01-01
      • 2011-06-11
      • 1970-01-01
      • 1970-01-01
      • 2011-04-03
      • 2011-10-11
      • 1970-01-01
      • 2014-11-30
      • 1970-01-01
      相关资源
      最近更新 更多