Dec 07

Creating a test certificate and signing your jar just involves three simple commands. Following shows the commands needed to firstly create your test certificate and add the certificate (with an alias of myCertAlias) to a keystore (named myKeyStore).

keytool -genkey -keystore myKeyStore -alias myCertAlias
keytool -selfcert -keystore myKeyStore -alias myCertAlias

The above only needs to be done once.
You can then use the keystore to sign your jar using the following command.

jarsigner -keystore myKeyStore jarfile.jar myCertAlias

written by objects \\ tags: , , , , , ,

Apr 28

Running the following will create a new keystore named myKeystore and password secret.

keytool -keystore myKeystore -genkey -keyalg RSA -alias mycert

written by objects \\ tags: , ,

Oct 15

You need to add the public key of the server you are connecting to to the keystore being by your application.

You can use the application InstallCert found in the question “How do I programatically extract a certificate from a site and add it to my keystore?” to extract the public key from the server and store it in your keystore.

written by objects \\ tags: , , ,