- Set Futurex PKCS #11 environment variables.
- Create a key pair on the CryptoHub by using pkcs11-tool.
- Generate a CSR by using the NGINX private key.
- Create a self-signed root certificate authority.
- Sign the NGINX CSR.
- Combine the NGINX and CA certificates into a single file.
- Configure NGINX to use the certificate and its associated private key stored in CryptoHub.
- Confirm NGINX uses the new TLS certificate and private key (stored on the CryptoHub) for HTTPS connections.
Set environment variables
Perform the following to set Futurex PKCS #11 environment variables:Create a key pair
Perform the following steps to create a key pair on the CryptoHub by using pkcs11-tool:In a terminal, run the following command to create a new ECC key pair on the CryptoHub:The preceding pkcs11-tool command prompts for the user PIN. Enter the CryptoHub identity password configured inside the **<CRYPTO-OPR-PASS>
** tag in the
Text
fxpkcs11.cfg file.If successful, the command output displays the keys that pkcs11-tool created on the CryptoHub.
Generate a CSR
Perform the following steps to generate a CSR by using the NGINX private key:Create a CA
This step creates and uses a self-signed root certificate authority (CA) for demonstration. In a production environment, you should use a secure certificate authority, such as the KMES Series 3, for all private key generation and certificate signing operations.
Sign the CSR
Perform the following steps to sign the NGINX CSR:Combine the certificates
To combine the NGINX and CA certificates into a single file, run the following commands in a terminal to combine the NGINX and CA certificates into a singlePEM file:
Text
Configure NGINX
This section covers how to modify the configuration file for an NGINX virtual host. Configuration of a virtual host is outside the scope of this guide. Refer to this documentation specific to your operating system if you have not configured a virtual host. Perform the following steps to configure NGINX to use the certificate and its associated private key stored in CryptoHub:The latest version ofNginx(as of September 2025) doesn’t support using URI to attain keys using OpenSSL Provider architecture in the uri2pem.py webiste:https://github.com/latchset/pkcs11-provider/blob/1362378ad3d5f40013bae7562cf7e5d79149925e/tools/uri2pem.pySet up a Python virtual environment and download the necessary libraries for this script to work:Afterwards, use the following commands to make sure they both point to Run the following commands to install the needed Python library, and the script with the URI:
.conf file. Luckily, pkcs11-provider by Latchset has a workaround by using a .pem file with URI information enclosed to attain the private key that is stored on CryptoHub.
Visit the following site and download the Python file uri2pem.py.ImportantFuturex will provide support for all other aspects of the integration; however, this script is not maintained by Futurex, and we cannot guarantee its functionality or offer troubleshooting support related to it.
Shell
~/projects/uri2pem/.venv/Shell
Shell
In a text editor, open the configuration file inside the
conf.d/ folder in the NGINX directory for the virtual host you want to configure HTTPS for, and modify it as shown in the following example:Text
You must update the paths in
sslcertificateand sslcertificate_key to point to the signed NGINX certificate and the NGINX private key PEM file, which was generated earlier with Python, as stored on your system.
