内容纲要
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: