由crt和key文件生成keystore文件

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

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

2.再生成keystore文件

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

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

参考

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

猜你喜欢

转载自www.cnblogs.com/tonglin0325/p/11672520.html