Step-by-step guide to install and configure the pkcs11-provider for OpenSSL.
Install the pkcs11-provider module from Latchset. This module allows OpenSSL 3.x to use PKCS #11 tokens through a provider interface. Follow the steps for your Linux version.
While apt can install the minimum required version (v0.3) of pkcs11-provider, it’s recommended to compile it from source to ensure you’re using the latest version. This helps avoid compatibility issues and ensures access to the most recent features and bug fixes.
NoteDuring installation, the pkcs11.so module is copied to the OpenSSL modules directory. You’ll need this path when updating the OpenSSL configuration file.
Example output:
Shell
Installing src/pkcs11.so to /usr/lib/x86_64-linux-gnu/ossl-modules
In this example, pkcs11.so is installed in /usr/lib/x86_64-linux-gnu/ossl-modules.
NoteDuring installation, the pkcs11.so module is copied to the OpenSSL modules directory. You’ll need this path when updating the OpenSSL configuration file.
Example output:
Shell
Installing src/pkcs11.so to /usr/lib64/ossl-modules
In this example, pkcs11.so is installed in /usr/lib64/ossl-modules.
The pkcs11-tool command for listing tokens may not function correctly on Rocky Linux 9 with pkcs11-provider. This is a known limitation and does not affect HSM functionality. Token verification works as expected on Rocky Linux 10.