Documentation Index Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
Use this file to discover all available pages before exploring further.
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.
Install on Ubuntu or Debian
Install the required packages: sudo apt update
sudo apt install \
git build-essential meson libssl-dev pkg-config \
libnss3 libnss3-dev libnss3-tools \
p11-kit opensc libp11-kit-dev \
python3-asn1crypto
See all 6 lines
Create a source directory and change into it:
Clone the pkcs11-provider repository: git clone https://github.com/latchset/pkcs11-provider.git
cd pkcs11-provider
See all 2 lines
Build the provider: meson setup builddir
meson compile -C builddir
See all 2 lines
Install the provider: sudo meson install -C builddir
See all 1 lines
During 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: Installing src/pkcs11.so to /usr/lib/x86_64-linux-gnu/ossl-modules
See all 1 lines
In this example, pkcs11.so is installed in /usr/lib/x86_64-linux-gnu/ossl-modules.
Install on RHEL
Important This step includes enabling the EPEL and CodeReady Builder (CRB) repositories, so ensure you have a valid RHEL subscription.
Enable CodeReady Builder (CRB) : RHEL 8 :sudo subscription-manager repos --enable codeready-builder-for-rhel-8- $( arch ) -rpms
See all 1 lines
RHEL 9 :sudo subscription-manager repos --enable codeready-builder-for-rhel-9- $( arch ) -rpms
See all 1 lines
Alma and Rocky Linux 8 :sudo dnf config-manager --set-enabled powertools
See all 1 lines
Alma and Rocky Linux 9 :sudo dnf config-manager --set-enabled crb
See all 1 lines
Install the EPEL Release package: sudo dnf install epel-release
See all 1 lines
Install prerequisites: sudo dnf check-update
sudo dnf install -y \
git \
gcc \
gcc-c++ \
meson \
ninja-build \
pkgconfig \
openssl-devel \
nss-devel \
p11-kit-devel \
opensc
python3-asn1crypto
See all 13 lines
Change to a source directory:
Clone the repository: git clone https://github.com/latchset/pkcs11-provider.git
cd pkcs11-provider
See all 2 lines
Build the provider: meson setup builddir
meson compile -C builddir
See all 2 lines
Install the provider: sudo meson install -C builddir
See all 1 lines
During 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: Installing src/pkcs11.so to /usr/lib64/ossl-modules
See all 1 lines
In this example, pkcs11.so is installed in /usr/lib64/ossl-modules.
Locate the OpenSSL configuration file. You can verify it using the following command openssl version -d. For instance: root@openvpnas:~# openssl version -d
OPENSSLDIR: "/usr/lib/ssl"
See all 2 lines
root@openvpnas:~# openssl version -d
OPENSSLDIR: "/etc/pki/tls"
See all 2 lines
Important This tutorial assumes openssl.cnf is located in /usr/lib/ssl/. Update the path in the following commands accordingly.
Create a backup of the OpenSSL configuration file before making changes: cp /usr/lib/ssl/openssl.cnf /usr/lib/ssl/openssl-backup.cnf
See all 1 lines
Open the OpenSSL configuration file for editing: nano /usr/lib/ssl/openssl.cnf
See all 1 lines
At the top of the file, add the following line if it’s not already present: openssl_conf = openssl_init
See all 1 lines
At the bottom of the file, add the following configuration block. Update the paths as needed for your system: [openssl_init]
providers = provider_init
[provider_init]
default = default_init
pkcs11 = pkcs11_init
[default_init]
activate = 1
[pkcs11_init]
module = /path/to/pkcs11-provider/pkcs11.so
pkcs11-module-path = /usr/local/lib/fxpkcs11/libfxpkcs11.so
pkcs11-module-token-pin = file:/path/to/file_with_pin.txt
activate = 1
See all 15 lines
Update the paths accordingly. In our example:
Replace /path/to/pkcs11-provider/pkcs11.so with /usr/lib/x86_64-linux-gnu/ossl-modules/pkcs11.so
Replace /path/to/file_with_pin.txt with /root/pkcs11-pin.txt
If you’re not sure where pkcs11.so is on your system, run this command: find / -type f -path '*/ossl-modules/pkcs11.so' 2>/dev/null
Save and exit the file — Ctrl-X, Y, then Enter.
Verify that the PKCS #11 provider loads correctly:
You should see both default and pkcs11 listed.
Example output:
root@openvpnas:~# openssl list -providers
Providers:
default
name: OpenSSL Default Provider
version: 3.0.13
status: active
pkcs11
name: PKCS#11 Provider
version: 1.1
status: active
See all 10 lines
Reboot the Access Server host: