tonglin0325的个人主页

由crt和key文件生成keystore文件

该图转自知乎 海棠依旧

 

1.先生成p12文件,生成的时候需要指定密码

1
2
openssl pkcs12 -export -in your_crt.crt -inkey your_key.key -out your_p12.p12

2.再生成keystore文件

1
2
keytool -importkeystore -v  -srckeystore your_p12.p12 -srcstoretype pkcs12 -srcstorepass 你设置的密码 -destkeystore your_keystore.keystore -deststoretype jks -deststorepass 你设置的密码

3.然后就能使用这个keystore文件和密码来进行https的请求

 

参考

1
2
https://blog.csdn.net/u013944791/article/details/73551253

其他证书转换参考

1
2
http://www.netkiller.cn/cryptography/openssl/format.html