Signing the Content Archive

To sign a content archive, the JAR signing tool, content archive to sign, and keystore must be located on the same system.

The example shown in this section signs the content archive
SERVICE_OFFERING_2c9f4ab8b896014ac3520ca7016d.zip with the certificate stored in the keystore .keystore_archive_signing which is accessed using the password <keystore_password>. The certificate is accessed using the alias csa_archive and the password <key_password>.

  1. Open a command prompt and change to the JDK's bin directory. For example, go to /usr/bin/javac/bin on Linux.

  2. Run the following command:

    Linux:

    jarsigner -keystore /tmp/.keystore_archive_signing
    -storepass <keystore_password> -keypass <key_password>
    /tmp/SERVICE_OFFERING_2c9f4ab8b896014ac3520ca7016d.zip csa_archive

    Optionally, you may specify -sigFile with a value that will be used to name the signature files that are added to the signed content archive. If not specified, it will use the first eight letters of the alias (csa_arch) to name the signature files.

  3. Optionally, verify the signed content archive by running the following command:

    Linux:

    jarsigner -verify /tmp/SERVICE_OFFERING_2c9f4ab8b896014ac3520ca7016d.zip

The content archive is signed and can be imported into CSA.