问题
Using keytool , or some other method, is there an easy way to import all contents of cacerts into a jssecacerts file?
Basically, I want to define my own jssecacerts but I want that jssecacerts to also contain all the trusted entries of the cacerts file. The reason for this is that I believe that when the jssecacerts file exists, the cacerts file contents are ignored.
回答1:
I figured it out:
%JRE_HOME%\bin\keytool.exe -importkeystore -destkeystore jssecacerts
-deststoretype jks -srcstorepass changeit -deststorepass changeit
-v -noprompt -srckeystore %JRE_HOME%\lib\security\cacerts
来源:https://stackoverflow.com/questions/7492220/is-it-possible-to-import-all-contents-of-cacerts-into-a-jssecacerts-file