The Java jarsigner tool serves the following purposes:Documentation Index
Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
Use this file to discover all available pages before exploring further.
- Signs Java ARchive (JAR) files.
- Verifies the signatures and integrity of signed JAR files.
Sign a Java Archive file
Perform the following steps to ensure that the keys stored on the HSM (that you need for signing) are accessible and sign a JAR file:Run the following keytool command to list all of the keys on the HSM that the configured identity can access:
Shell
The response should be similar to the following example:
Shell
Now that you’ve confirmed the keys needed for code signing are accessible, run the following command to sign a JAR file by using the HSM-stored keys:
The last field in thefollowing command, JarsignerDemo, must match the alias you specified in the keytool -importcert command in the previous section.
Shell
When prompted for the passphrase of the KeyStore, enter the password you specified for the JarsignerDemo KeyStore in the previous section.
If the signing succeeds, the response includes a confirmation message that says: jar signed.
Refer to the Oracle documentation about other flags you can use in the preceding jarsigner command, such as -tsa and -tsacert.
Verify the signature of a signed JAR file
The jarsigner command in the previous section returned a signed JAR file calleddemo_signed.jar. To verify the signature, perform the following task:

