Common Issues and How to Resolve Them

Error

Diagnosis

The private key was not found at: pkcs11:token=FedoraCert;object= CertKey1

PKCS11_get_private_key returned NULL Could not read private key from org.openssl.engine:pkcs11:pkcs11:token=FedoraCert;object= CertKey1

Check that the Key exists on the slot and provide the correct key name.

11.01.2023 11:18:37.059 | [00016138:00016138] open_plugin| W: HSM::ConnectionException(Error::NO_DEVICE_AVAILABLE = 0xbe000007) thrown in select_device Error::NO_DEVICE_AVAILABLE

Make the changes in the key storage section in the cs_pkcs11.cfg file and check that the HSM device is running and reachable from the host.

20.06.2025 07:56:39: C_OpenSession returned Error 0x00000005 (CKR_GENERAL_ERROR)

Check the PKCS#11 log (/tmp/cs_pkcs11_R3.log by default) for errors. If it doesn’t exist or doesn’t get updated, check if the CS_PKCS11_R3_CFG environment variable is set with the location of the PKCS#11 configuration file.

List of errors and their diagnoses