pfx证书查看信息,pfx证书生成其他证书格式

2020年11月23日 5074点热度 2人点赞 2条评论
内容目录

pfx 转换为其他类型证书的方法。

pfx 转 pem

 openssl pkcs12 -in ssl.pfx -nodes -out ssl.pem    

pem 转 cer

 openssl x509 -in ssl.pem -inform PEM -out ssl.der -outform DER  

输出 pem 证书的所有信息:

 openssl x509 -in ss.pem -noout -text 
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 8690034818132552156 (0x789934a01720d184)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = CN, O = a, OU = a RSA CA 2020, L = a, ST = a
        Validity
            Not Before: Nov 12 05:32:22 2020 GMT
            Not After : Nov 13 05:32:22 2022 GMT
        Subject: C = CN, O = a, CN = 192.168.0.209
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
                    00:81:83:29:a0:51:2c:ee:52:0d:6b:59:92:3d:94:
                    6a:7e:64:bb:54:b3:16:b7:26:b2:22:18:8c:a1:0b:
                    79:5b
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Subject Key Identifier:
                E7:53:10:E1:34:AC:4D:D8:A6:0D:2D:91:A9:75:8C:ED:84:A0:4E:E5
            X509v3 Authority Key Identifier:
                keyid:E7:53:10:E1:34:AC:4D:D8:A6:0D:2D:91:A9:75:8C:ED:84:A0:4E:E5

            X509v3 Extended Key Usage: critical
                TLS Web Server Authentication
    Signature Algorithm: sha256WithRSAEncryption
         1f:5b:a0:f6:9e:49:52:5d:40:72:1b:9c:fe:35:90:69:93:c6:
         73:de:ff:bf

痴者工良

高级程序员劝退师

文章评论

  • 痴者工良

    keytool -list -keystore 私钥路径 -storepass 私钥密码 -storetype pkcs12
    keytool -list -keystore ssl.pfx -storepass 123456 -storetype
    pkcs12

    2020年12月31日
  • 痴者工良

    查看指纹信息:
    openssl x509 -fingerprint -sha1 -in cerfile.crt
    openssl x509 -fingerprint -sha256 -in cerfile.crt

    crt 可以改为 .pem等证书格式

    2020年12月31日