【问题标题】:PHP determine type of SSL certificatePHP 确定 SSL 证书的类型
【发布时间】:2011-06-23 08:38:21
【问题描述】:

我有可以在浏览器中看到的证书 - 由 VeriSign 签名 - G3 但是当我尝试使用 pkcs12 或 x509 或 pkcs7 之类的 openSSL(或 PHP)阅读时 - 错误如下:

openssl pkcs12 -in cert.to.test.cer -clcerts -nokeys -out mycert.crt

28685:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1306:
28685:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:tasn_dec.c:830:
28685:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:749:Field=version, Type=PKCS12

在PHP中读取证书的参数可以做些什么? 谢谢。

【问题讨论】:

    标签: php certificate openssl verisign


    【解决方案1】:

    你可以试试

    openssl x509 -in certificate.der -inform der -text -noout
    

    可能是DER编码的证书

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-25
      • 1970-01-01
      • 1970-01-01
      • 2011-10-31
      • 2015-01-01
      • 2011-09-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多