heartfailure
heartfailure

Reputation: 96

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.

Upvotes: 3

Views: 7209

Answers (1)

heartfailure
heartfailure

Reputation: 96

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

Upvotes: 2

Related Questions