EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PKCS11 Cert Storage with 64 bits dll

Posted: 07/01/2011 07:26:46
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14


I'm using Blackbox version 9.0, and I have an application that opens a PKCS11 Cert Storage through a DLL which provides the PKCS#11 API. The Blackbox class used is ElPKCS11Storage.

In 32bits systems there isn't any problem but in 64bits systems, i get a "An attempt was made to load a program with an incorrect format" message. I'm sure that the DLL i'm using is 64bits.

I don't get more information, Does blackbox support 64bits DLL archives for opening a PKCS#11cert storage?

Previously the system was using Blackbox 7, changing to 9 didn't solve the problem.

Thanks in advance.
Posted: 07/01/2011 07:31:13
by Ken Ivanov (Team)

Thank you for contacting us.

SecureBlackbox supports both 32 bit and 64 bit PKCS#11 drivers. However, please note that there are two different versions of proxy DLLs (SecureBlackbox_PKCS11Proxy.dll), and you should use the appropriate one under the particular architecture.
Posted: 07/05/2011 06:15:05
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

Hello again,

The "incorrect format" problem was solved with the proper proxy DLL, but now when loading the PKCS#11 DLL the application crashes.

I'm using the CryptoTokenDemo.exe included as a sample in secureBlackbox and the PKCS#11 DLL driver is "acpkcs211.dll" from ActivClient x64 6.2.

The OS is 64-bits Windows Server 2008 SP2.

The information of the crash is:
Firma con problemas:
Nombre del evento de problema: BEX64
Nombre de la aplicación: CryptoTokenDemo.exe
Versión de la aplicación: 1.0.4202.29331
Marca de tiempo de la aplicación: 4e11db2b
Nombre del módulo con errores: StackHash_1479
Versión del módulo con errores:
Marca de tiempo del módulo con errores: 00000000
Desplazamiento de excepción: 0000000000000000
Código de excepción: c0000005
Datos de excepción: 0000000000000008
Versión del sistema operativo: 6.0.6002.
Id. de configuración regional: 3082
Información adicional 1: 1479
Información adicional 2: 5dd921b8144e33f5ee992cfe4a50c794
Información adicional 3: ad8f
Información adicional 4: 419168b94942ce8104ca073c955595c7

Lea nuestra declaración de privacidad:

Thanks in advance.
Posted: 07/05/2011 06:28:06
by Ken Ivanov (Team)

Are you using the firmware from the following site (http://militarycac.com/activclient.htm)? They have the below comments on their web page:
NOTE: If you have Windows XP (64 bit) be aware that the 64-bit 6.2 version doesn't seem to work. You will need the 64 bit ActivClient 6.1 AND IF you have the newer CAC, you will need to visit this page to download the needed update.

It can be that the same issue occurs on Windows 6 systems too.
Posted: 07/05/2011 11:15:46
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

I have tried with ActivClient 6.1 DLL, even with the spanish DNIe PKCS#11 DLL and the result is the same crash. How can i debug the problem?

Posted: 07/05/2011 11:24:12
by Ken Ivanov (Team)

According to the exception message, the reason for the problem is Access Violation (c0000005) exception that occurs somewhere in the driver. Could you please let us know, which exactly call results in this exception, so that we could try to localize it here?
Posted: 07/11/2011 09:36:25
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

The last call is Storage.Open(), then program crashes.

Private Sub OpenStorage()
Dim SlotInfo As TElPKCS11SlotInfo
If OpenDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Storage = New TElPKCS11CertStorage
Storage.DLLName = OpenDialog.FileName
cbSlots.Items.Add("<Please select a slot>")
Posted: 07/11/2011 09:44:45
by Ken Ivanov (Team)

So, does the Open() method return successfully, or the exception is thrown from inside of it?
Posted: 07/11/2011 10:12:50
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

Open() doesn't return, crashes inside.
Posted: 07/11/2011 10:16:33
by Ken Ivanov (Team)

Thank you for the details. Could you please catch a relevant call stack for us?



Topic viewed 9218 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!