Viewing PFX Certificate Information and Generating Other Certificate Formats from PFX Certificate

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

How to convert pfx to other types of certificates.

Convert pfx to pem

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

Convert pem to cer

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

Output all information of the pem certificate:

 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</code></pre>

痴者工良

高级程序员劝退师

文章评论