Running verifycap

The file to invoke verifycap is a shell script/batch file (verifycap.[sh|bat]) that you must run from a working directory of JC_HOME_TOOLS\bin in order for the code to execute properly.

To run verifycap:

  1. Enter the following command (verifycap Command Line Arguments describes the available options):

    verifycap.[sh|bat] [options] export-files CAP-file

Table 6-1 verifycap Command Line Arguments

Argument Description

export-files

A list of export files of the packages that this CAP file uses could be either one of the following:

  • Export files corresponding to the package version available on the target platform.
  • Export files corresponding to the version of imported packages. In this case, you also need to check that these export files are binary compatible with export files corresponding to the packages available on the target platform.

Note that, when using this option in conjunction with the -target command line argument, any export file in this list corresponding to a Java Card platform package will automatically be overridden by the verifier to use an internal copy of the export file matching the specified target version.

For more information, see the -target command line argument in Converter Command Line Arguments.

CAP-files

Name of the CAP file to be verified.

-digest digest-algorithm-name

Specifies the digest algorithm to use for computing hash values for required CAP components. If this option is not specified or an invalid algorithm name is specified, the verifier uses SHA-256 as the default algorithm.

-outfile hash-output-file-path

Specifies the path to the text file that the verifier uses to output the computed hash values for the required CAP components. If this option is not specified, hash values are output to the system console.

Command Line Options for Off-Card Verifier Tools describes additional verifycap options.