用命令行执行下面的命令:
1.把PEM转成PKCS12格式
openssl pkcs12 -export -out cacert.p12 -in cacert.pem
2. 把PKCS 转成crt
openssl pkcs12 -in cacert.p12 -out mycerts.crt -nokeys -clcerts
3.把crt转成cer
openssl x509 -inform pem -in mycerts.crt -outform der -out mycerts.cer