今天在StartSSL上申请了几个证书,得到.key以及.crt文件,但在使用时还需利用openssl对其进行转换,在此做个记录。
1.x509转换为pfx:
openssl pkcs12 -export -out cacert.pfx -inkey cakey.key -in cacert.crt
2.x509转换为pem:
openssl rsa -in cakey.key -out key.pem -outform PEM
3.x509转换为PKCS#12:
openssl pkcs12 -export -in cacert.crt -inkey cakey.key -out cacert.p12
4.PKCS#12转换为pem:
openssl pkcs12 -in cacert.p12 -nodes -out cacert.pem
其他的转换目前还没用到,在用到时再在此做记录。