Pkcs11Interop / Pkcs11Interop.X509Store

Easy to use PKCS#11 based X.509 certificate store
Apache License 2.0
31 stars 18 forks source link

Pkcs11Exception: Method C_Initialize returned CKR_GENERAL_ERROR #15

Closed Weiderson closed 3 years ago

Weiderson commented 3 years ago

Has anyone ever experienced this?

I am running the Pkcs11Interop.X509Store code inside an MVC client application to access the HSM device's private key in order to generate file signatures with BouncyCastle. The following error occurred:

Inner Exception 1: Pkcs11Exception: Method C_Initialize returned CKR_GENERAL_ERROR

System.TypeInitializationException

This exception was originally thrown at this call stack: [External Code] Net.Pkcs11Interop.X509Store.SoftHsm2Manager.InitializeTokens() in SoftHsm2Manager.cs Net.Pkcs11Interop.X509Store.SoftHsm2Manager.Soft