cryptoki

Pkcs11Exception: Method C_Initialize returned 2147483907

二次信任 提交于 2019-12-12 10:12:19
问题 I have a simply method to access my HSM with Pkcs11Interop. This is the function: static public byte[] findTargetKeySValue(String label, String type, string command) { try { string pkcs11LibraryPath = @"C:\Program Files\SafeNet\Protect Toolkit 5\Protect Toolkit C SDK\bin\hsm\cryptoki.dll"; Utility.Logger("cryptoki dll path " + pkcs11LibraryPath, command); using (Pkcs11 pkcs11 = new Pkcs11(pkcs11LibraryPath, Inter_Settings.AppType)) { // Find first slot with token present Slot slot = Inter