如何将.jks文件转换为p12。jks是一个p12密钥存储文件,如何将其转换为java格式?
发布于 2010-06-16 22:14:12
将JKS文件转换为PKCS12格式(Java1.6.x及以上)
keytool \
-importkeystore \
-srckeystore KEYSTORE.jks \
-destkeystore KEYSTORE.p12 \
-srcstoretype JKS \
-deststoretype PKCS12 \
-srcstorepass mysecret \
-deststorepass mysecret \
-srcalias myalias \
-destalias myalias \
-srckeypass mykeypass \
-destkeypass mykeypass \
-noprompt发布于 2015-05-03 05:28:01
JKS→P12:
keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12P12→JKS:
keytool -importkeystore -srckeystore keystore.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore keystore.jks发布于 2016-09-15 13:28:06
下面是一个与此相同的命令行。
keytool -importkeystore -srckeystore <MY_KEYSTORE.jks> -destkeystore <MY_FILE.p12> -srcstoretype JKS -deststoretype PKCS12 -deststorepass <PASSWORD_PKCS12> -srcalias <ALIAS_SRC> -destalias <ALIAS_DEST>
参数说明:
MY_FILE.p12: path to the PKCS#12 file (.p12 or .pfx extension) that is going to be created.
MY_KEYSTORE.jks: path to the keystore that you want to convert.
PASSWORD_PKCS12: password that will be requested at the PKCS#12 file opening.
ALIAS_SRC: name matching your certificate entry in the JKS keystore, "tomcat" for example.
ALIAS_DEST: name that will match your certificate entry in the PKCS#12 file, "tomcat" for example.https://stackoverflow.com/questions/2846828
复制相似问题