pkcs11

package
v0.17.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

README

PKCS#11 engine

Testing

Tests in this package use Software HSM for testing. The tests will skip if softhsm2 driver is not found. Install softhsm2 if you want to run these tests. Directory softhsm-testdata contains predefined token with keys expected by the tests.

If the driver is installed but not being detected you can set the SOFTHSM2_LIB environment variable to inform the test where to find the library:

# linux
$ export SOFTHSM2_LIB=/usr/local/lib/softhsm/libsofthsm2.so

# windows
SET SOFTHSM2_LIB=V:/dev/tools/softhsm2/lib/softhsm2-x64.dll

Documentation

Index

Constants

View Source
const EngineId = "pkcs11"

Variables

View Source
var Engine = &engine{}

engine supporting generic PKCS#11 HSM driver possible key URLs:

  • `pkcs11:/usr/lib/softhsm/libsofthsm2.so?slot=0&id=2171` - full driver path
  • `pkcs11:softhsm2?slot=0&id=2171` - driver id, driver will be loaded according to following rules: driver id converted to OS specific library file name (on *nix `lib${driver}.so`) then loaded according to dynamic loader configuration (on *nix according to http://man7.org/linux/man-pages/man3/dlopen.3.html)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL