Steps for running the pre-compiled version of testpkcs11

About this task

Before you begin: You need to know how to use z/OS® UNIX shells.

Perform the following steps to run the pre-compiled version of testpkcs11.

Procedure

  1. Change to the PKCS #11 bin directory by entering the following command:
    cd /usr/lpp/pkcs11/bin

    ______________________________________________________________

  2. Choose a temporary token name to use. If you need to review the rules for token names, see Tokens.

    ______________________________________________________________

  3. Run testpkcs11, passing it your token name on the -t option. For example, to use a temporary token name of my.temp.token, enter the following command:
    ./testpkcs11 -t my.temp.token 

Results

If z/OS PKCS #11 has been set up properly and the you have sufficient authority to the token label specified, you should see the following output:
Getting the PKCS11 function list...
Initializing the PKCS11 environment...
Creating the temporary token...
Opening a session...
Generating keys. This may take a while...
Enciphering data...
Deciphering data...
Destroying keys...
Closing the session...
Deleting the temporary token...
Test completed successfully!
If you see different messages, there is an error in either your PKCS #11 set up or in the token label that you specified.
The most common user error is specifying token label that is unacceptable to ICSF or already in use. In that case the following is displayed:
Getting the PKCS11 function list...
Initializing the PKCS11 environment...
Creating the temporary token...
   C_InitToken #1 returned 7 (0x07) CKR_ARGUMENTS_BAD
   Make sure your the token name you specified meets ICSF rules: 
   Contains only alphanumeric characters, nationals (@#$), and periods.
   The first character cannot be a numeric or a period.

If you see other error messages, there is probably an error in the setup for the PKCS #11 environment. Determine the error represented by the PKCS #11 error code returned. For information about error codes, see Function return codes.

To display the help text for the testpkcs11 program, run the program with the -h option:
cd /usr/lpp/pkcs11/bin
./testpkcs11 -h