This section covers the following tasks: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 haproxy.
- Generate a key pair on the Vectera Plus by using pkcs11-tool.
- Generate a self-signed certificate for HAProxy by using OpenSSL.
- Store a reference to the HSM-stored private key inside a special PEM object with the label
PKCS#11 PROVIDER URI. This object is a container for the PKCS #11 URI and contains no keying material.
Install OpenSC
To generate a new key pair on the Vectera Plus, use pkcs11-tool, which is included in the OpenSC package available through the default package manager in most Linux distributions. In a terminal, run the following commands to update the package index and install haproxy:Shell
Generate a key pair
Perform the following steps to generate a key pair on the Vectera Plus using pkcs11-tool:In a terminal, run the following command:
Shell
If you haven’t set the
FXPKCS11_MODULE environment variable to the location of the FXPKCS11 library file, update the --module parameter to specify the full path to the module (such as /usr/local/bin/fxpkcs11/libfxpkcs11.so).Enter the identity password configured in the
fxpkcs11.cfg file when prompted for the User PIN.If the command succeeds, the keys display in the output, as shown in the following example:The command creates the following keys:
Shell
- A private RSA 2048 key with asymmetric decrypt, sign, signRecover, and unwrap usage
- A public RSA 2048 key with encrypt, verify, verifyRecover, and wrap usage.
3 | Generate a self-signed certificate
Use OpenSSL to perform the following steps to use OpenSSL to generate a self-signed certificate for HAProxy from the key pair stored on the HSM.Create a reference to the private key
Perform the following steps to create a reference to the HSM-store private key by using theuri2pem.py script:
Download the
uri2pem.py script (gist.github.com/space88man/22ef88c506fc84ae5f333ee7268e0e14).Run the script with the following command:
Shell
If the script completes without any errors, the special PEM stanza outputs to the terminal in the following format:
None
The preceding stanza decodes to the PKCS #11 URI of the private key stored on the HSM. This object is a container for the PKCS #11 URI and contains no keying material.

