PrivateKeyEntry in the Java keystore, with no CryptoHub UI step.
The private key stays on the CryptoHub. Curity references the resulting keystore entry through the SunPKCS11 provider to serve TLS.
The
keytool application is included in the JDK installation, so you can run the keytool commands in this section with no additional configuration.Generate the key pair and certificate
Perform the following steps to generate the TLS server certificate and key pair on the CryptoHub:1
Export FXPKCS11_CFG so the Futurex PKCS #11 library can locate its configuration file (
fxpkcs11.cfg). Point it at the fxpkcs11.cfg you configured in Install and configure Futurex PKCS #11:Shell
This step relies on the corrected SunPKCS11 configuration file (
pkcs11.cfg) created in Configure SunPKCS11 to use the Futurex PKCS #11 module. Passing pkcs11.cfg on the command line (with -providerArg) is not enough on its own; without FXPKCS11_CFG, the token does not appear.2
Execute the following command, passing the
pkcs11.cfg file you created in the previous section with -providerArg. This generates an RSA 2048 key pair and self-signs a TLS server certificate with the common name Demo_1:Text
The keytool application generates the key pair on the CryptoHub and self-signs a certificate for it. With no
-storepass on the command line, keytool prompts for the keystore password.3
When prompted for the keystore password, enter the CryptoHub identity password (PKCS #11 PIN) configured inside the
<CRYPTO-OPR-PASS> tag in the fxpkcs11.cfg file.Verify the private key entry linked to the TLS server certificate is in the Java keystore
Run the following keytool command to confirm that the key pair was generated on the CryptoHub and that the keystore lists aPrivateKeyEntry. The -providerArg flag passes the pkcs11.cfg file you created in the previous section:
Shell
<CRYPTO-OPR-PASS> tag in the fxpkcs11.cfg file.
If the command succeeds, you see an output similar to the following:
None

