站长之家官网登录入口,域联网站建设,安徽机械加工网,怎么做微信上的网站吗PKCS 全称是 Public-Key Cryptography Standards #xff0c;是由 RSA 实验室与其它安全系统开发商为促进公钥密码发展而制订的一系列标准。PKCS 目前共发布过 15 个标准。常用的有#xff1a;1. PKCS#7 Cryptographic Message Syntax Standard2. PKCS#10 Certification Requ… PKCS 全称是 Public-Key Cryptography Standards 是由 RSA 实验室与其它安全系统开发商为促进公钥密码发展而制订的一系列标准。PKCS 目前共发布过 15 个标准。常用的有1. PKCS#7 Cryptographic Message Syntax Standard2. PKCS#10 Certification Request Standard3. PKCS#12 Personal Information Exchange Syntax Standard4. X.509是常见通用的证书格式。所有的证书都符合为Public Key Infrastructure (PKI) 制定的 ITU-T X509 国际标准。5. PKCS#7 常用的后缀是 .P7B .P7C .SPC6. PKCS#12 常用的后缀有 .P12 .PFX7. X.509 DER 编码(ASCII)的后缀是 .DER .CER .CRT8. X.509 PAM 编码(Base64)的后缀是 .PEM .CER .CRT9. .cer/.crt是用于存放证书它是2进制形式存放的不含私钥。10 .pem跟crt/cer的区别是它以Ascii来表示。11. pfx/p12用于存放个人证书/私钥他通常包含保护密码2进制方式12. p10是证书请求13. p7r是CA对证书请求的回复只用于导入14. p7b以树状展示证书链(certificate chain)同时也支持单个证书不含私钥。1. CA证书用openssl创建CA证书的RSA密钥(PEM格式)openssl genrsa -des3 -out ca.key 10242. 创建CA证书有效期为一年用openssl创建CA证书(PEM格式,假如有效期为一年)openssl req -new -x509 -days 365 -key ca.key -out ca.crt -configopenssl.cnf openssl是可以生成DER格式的CA证书的最好用IE将PEM格式的CA证书转换成DER格式的CA证书。将生成的crt格式证书导入到IE再导出就是cer格式了3. x509转换为pfxopenssl pkcs12 -export -out server.pfx -inkey server.key -inserver.crt 4. PEM格式的ca.key转换为Microsoft可以识别的pvk格式pvk -in ca.key -out ca.pvk -nocrypt -topvk 5. PKCS#12 到 PEM 的转换openssl pkcs12 -nocerts -nodes -in cert.p12 -out private.pem 验证 opensslpkcs12 -clcerts -nokeys -in cert.p12 -out cert.pem 6. 从 PFX 格式文件中提取私钥格式文件 (.key)openssl pkcs12 -in mycert.pfx -nocerts -nodes -out mycert.key 7. 转换 pem 到到 spc openssl crl2pkcs7 -nocrl -certfilevenus.pem -outform DER -out venus.spc 用 -outform -inform 指定 DER 还是 PAM 格式。例如openssl x509 -in Cert.pem -inform PEM -out cert.der -outform DER 8. PEM 到 PKCS#12 的转换openssl pkcs12 -export -in Cert.pem -out Cert.p12 -inkey key.pem IIS 证书cd c:\openssl set OPENSSL_CONFopenssl.cnf openssl pkcs12 -export -out server.pfx -inkeyserver.key -in server.crt server.key和server.crt文件是Apache的证书文件生成的server.pfx用于导入IIS9. How to Convert PFX Certificate to PEM Format for SOAP$ openssl pkcs12 -in test.pfx -out client.pem Enter Import Password: MAC verified OK Enter PEM pass phrase: Verifying - Enter PEM pass phrase: 转载于:https://blog.51cto.com/ponyjia/1201018