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 JAR file
Before signing a JAR file, ensure that the keys stored on the CryptoHub needed for signing are accessible.Then, run the following keytool command to list all of the keys on the CryptoHub that the configured identity has access to:
Shell
When prompted for the KeyStore password in this command and the following commands, enter the CryptoHub identity password configured inside the
<CRYPTO-OPR-PASS> tag in the fxpkcs11.cfg file.The response should be similar to the following:
Shell
Now that you know the keys needed for code signing are accessible, run the following command to sign a JAR file using the CryptoHub-stored keys:Refer to the Oracle documentation to learn about flags that you can use in the preceding jarsigner command, such as -tsa and -tsacert.
You must run the command from the same directory where you stored the
example.jar file.Shell
You must copy and paste the value specified in the last field of the preceding jarsigner command, Java Jarsigner:Code Signer:C, from the output you see in the list command in step 2.
If the signing succeeds, the response includes a confirmation message that says, jar signed.
Verify the signature
Run the following command to verify the signature of the signed JAR file output from the previous jarsigner command,demo_signed.jar:
Shell
If the verification succeeds, the response includes a confirmation message that says, jar verified.

