Error on using PKCS#11 Driver Library acospkcs11.dll in Chilkat PKCS11 for .NET 8

82 Views Asked by At

I am successfully using Pkcs11Interop 5.1.2 library for digital signing using PKCS#11 Driver Library acospkcs11.dll. But when using the ChilkatDnCore 9.50.97 library (License purchased), when I call the following code:

Chilkat.Global glob = new Chilkat.Global();
bool success = glob.UnlockBundle("XXXX");
Chilkat.Pkcs11 pkcs11 = new Chilkat.Pkcs11();
pkcs11.SharedLibPath = "C:/Program Files (x86)/CTS/Desktop Suite/native_libs/acospkcs11.dll";
pkcs11.Initialize();

I get an error: has exited with code 3221225725 (0xc00000fd) 'Stack overflow' or has exited with code 3221225477 (0xc0000005) 'Access violation'

Please help me solve this problem.

I ran this code in the console app in x86 mode.

1

There are 1 best solutions below

1
Chilkat Software On

Even though you said it worked with the Pkcs11Interop 5.1.2 library, I still think it's likely the problem is happening within the acospkcs11.dll.

Try this: Turn on verbose logging like this:

pkcs11.VerboseLogging = true;

Then also set the DebugLogFilePath like this:

pkcs11.DebugLogFilePath = "c:/temp/debugLog.txt";

Then re-run your code to reproduce the error and examine the contents of the debugLog.txt.