Skip to content
PKCS#11 Test Suite
C++ Shell Python Makefile M4 CMake C
Branch: dev
Clone or download
blukat29 and daviddrysdale Safely pass attribute value (#18)
The `len` variable declared in the if block is only alive during
the if block. Once the program moves on to C_GenerateKey, the
variable may be destroyed.
Latest commit 00674e1 Aug 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gtest-1.6.0 Add local copy of gTest 1.6 Sep 9, 2013
third_party/pkcs11 Convert PKCS#11 headers to UNIX line endings Oct 8, 2014
.gitignore Improve README Nov 10, 2014
.travis.yml .travis.yml: drop chaps-linux test May 30, 2018
LICENSE Add Apache-2.0 license Sep 18, 2014
README.md Improve README Nov 10, 2014
chap Add -gdb option to convenience scripts Nov 12, 2014
cipher.cc Use public objects in public session tests (#15) Aug 13, 2019
describe.cc Move tests of internal utilities to separate file Oct 8, 2014
digest.cc
dual.cc Add dual-operation test Nov 12, 2014
globals.cc Allow EC-specific flags for EC mechanisms (#8) Jun 18, 2018
globals.h Allow EC-specific flags for EC mechanisms (#8) Jun 18, 2018
hmac.cc Improve HmacTestVector test for short keys (#16) Aug 14, 2019
init.cc Emit rv if it fails to match either possible value Oct 8, 2014
key.cc Emit rv if it fails to match either possible value Oct 8, 2014
keypair.cc Use public objects in public session tests (#15) Aug 13, 2019
login.cc Add braces to silence dangling-else warning Mar 6, 2019
makefile Optionally pack PKCS#11 structures (#6) Jun 5, 2018
object.cc Use public objects in public session tests (#15) Aug 13, 2019
ock Add -gdb option to convenience scripts Nov 12, 2014
pkcs11-describe.cc Move hex_decode() utility into common file Oct 1, 2014
pkcs11-describe.h Optionally pack PKCS#11 structures (#6) Jun 5, 2018
pkcs11-env.h Optionally pack PKCS#11 structures (#6) Jun 5, 2018
pkcs11test.cc Allow slots to be selected by -S <index> (#13) Jun 28, 2019
pkcs11test.h Safely pass attribute value (#18) Aug 20, 2019
rng.cc Cope with CKR_RANDOM_SEED_NOT_SUPPORTED Mar 6, 2019
session.cc Allow a wider range of return values Oct 16, 2014
sign.cc Move algorithm parameter tables to be global Nov 12, 2014
slot.cc Allow EC-specific flags for EC mechanisms (#8) Jun 18, 2018
tookan.cc Add link to Tookan project page Nov 12, 2014

README.md

pkcs11Test: A PKCS#11 Test Suite

Warning: Do not run this test suite against a PKCS#11 token that contains real data; some of the tests may erase or permanently lock the token.

This repository holds a test suite for, and is therefore derived from, the RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki).

To build the test program on Linux, just run make. To run the tests against common Linux PKCS#11 implementations:

This is NOT an official Google product.

Test Options

The test program requires the following command-line parameters to be set:

  • -m libname: Provide the name of the PKCS#11 library to test.
  • -l libpath: Provide the path holding the PKCS#11 library.

There are also several optional command-line parameters:

  • -s slotid: Provide the slot ID that will be used for the tests
  • -v: Generate verbose output.
  • -u pwd: Provide the user PIN/password.
  • -o pwd: Provide the security officer PIN/password.
  • -I: Perform token initialization tests. This will wipe the contents of the PKCS#11 token

The test program uses Google Test, and the Google Test command line options are also available. In particular, --gtest_filter=<filter> can be used to run a subset of the tests.

You can’t perform that action at this time.