简体   繁体   中英

Add certificate to JAVA > Signer CA through command-line

I have created a Deployment ruleset for JAVA. This file is self-signed with a certificate. In order to use this ruleset you need to import the certificate to JAVA > Security > Certificates > Signer CA.

If I do this manually the ruleset works so no problem there. But I would like to deploy this to all my users with a script.

If I use following script it places the certificate under Trusted Certificates, but I need it under Signer CA in order for it to work.

keytool -import -v -file C:\certificate.crt -alias Alias1 -keystore "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs"  -storepass pwd -noprompt

I have searched high and low but can't seem to find a working solution.

I finally found the solution! :) I needed to import it to trusted.cacerts instead of trusted.certs !

It looks like this:

keytool -import -v -file C:\certificate.crt -alias Alias1 -keystore "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.cacerts"  -storepass pwd -noprompt

Source: http://symplik.blogspot.be/2013/11/get-rid-of-java-applet-warning-when_3.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM