EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PKCS11 Cert Storage with 64 bits dll

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#17015
Posted: 07/12/2011 11:33:07
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

The exception seems to be uncatchable, I tried to debug it but windows don't let me debug the debugger.

The information with the program launched in debug mode in visual studio 2005 is:

vshost.exe dejó de funcionar (stop working)

Quote

Nombre del evento de problema: BEX64
Nombre de la aplicación: CryptoTokenDemo.vshost.exe
Versión de la aplicación: 8.0.50727.42
Marca de tiempo de la aplicación: 4333d898
Nombre del módulo con errores: StackHash_b864
Versión del módulo con errores: 0.0.0.0
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.2.2.0.272.7
Id. de configuración regional: 3082
Información adicional 1: b864
Información adicional 2: 1633d2e9ae7bea22ce885de4ee3745bc
Información adicional 3: 8bd3
Información adicional 4: f2167e114c1a904522569ad7cff9acf3

Lea nuestra declaración de privacidad:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0c0a


Thanks in advance
#17016
Posted: 07/12/2011 12:57:24
by Ken Ivanov (EldoS Corp.)

Thank you for the details. I think we will need to try to reproduce the issue with the aforementioned driver in our conditions. Will get back to you once we find out something.
#17018
Posted: 07/13/2011 02:32:17
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

Thank you, we have a project in danger for this issue. Please answer ASAP.

Thanks in advance.
#17030
Posted: 07/13/2011 10:29:42
by Ken Ivanov (EldoS Corp.)

Could you please check if the attached proxy DLL resolves the issue for you?


[ Download ]
#17032
Posted: 07/13/2011 11:04:50
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

In the Storage.Open() call an exception is catched: "An attempt was made to load a program with an incorrect format".

I have tried with various PKCS#11 64-bits DLL drivers and the result is always the same.

Thanks
#17033
Posted: 07/13/2011 11:12:44
by Ken Ivanov (EldoS Corp.)

Are you 1) compiling your application explicitly for x64 target, 2) providing 64 bit DLLs to the TElPKCS11CertStorage component?
#17035
Posted: 07/13/2011 11:27:26
by Ken Ivanov (EldoS Corp.)

Follow-up: a common mistake is providing incorrect driver DLL to the component. In most of the cases the paths to the PKCS11 driver DLL will be equal for both x86 and x64 applications (and will usually point to something like C:\Windows\System32\<drivername>.dll). Though x86 and x64 drivers are in fact located in different places (usually, C:\Windows\System32\<drivername>.dll for x64 applications, and C:\Windows\SysWOW64\<drivername>.dll for x86 applications), virtualization does the job here by mapping the contents of SysWOW64 directory to "virtual" System32 directory for x86 applications.
#17037
Posted: 07/14/2011 04:24:45
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

I'm compiling CryptoTokenDemo in x64 configuration, and I have checked with Dependency Walker that both CryptoTokenDemo.exe and acpkcs211rc.dll are x64 too.

The message remains: "An attempt was made to load a program with an incorrect format" and I'm using the proxy dll you attached on 07/13/2011 10:29:42 message.

I can't attach my ActiveIdentity 64-bits PKCS#11 driver DLL, acpkcs211rc.dll. 20KB in a rar file, How can i send it to you?

I have also tested with other 64-Bits PKCS#11 drivers with the same result.

Thanks
#17038
Posted: 07/14/2011 05:45:22
by Ken Ivanov (EldoS Corp.)

The strange thing is that the error with such message is returned if 32 bit DLL is attempted to be loaded into 64 bit address space. Is this message returned as a consequence of TElPKCS11CertStorage.Open() call?

The forum only supports ZIP and textual attachments, so please use ZIP instead of RAR to compress the drivers. Meanwhile, we'll perform some further investigations with the drivers we have here.
#17041
Posted: 07/14/2011 09:00:47
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

Hello,

Could be a problem with dep? We are working on a windows server 2008 64bits. In our last tests we can open the pkcs11 attached dll but we can not open any slot and when we try to insert a card it does not occur anything. After that we start CryptoTokenDemo.exe and we try to open the same dll it crashes with the error:

Nombre del evento de problema: APPCRASH
Nombre de la aplicación: CryptoTokenDemo.exe
Versión de la aplicación: 1.0.4212.17375
Marca de tiempo de la aplicación: 4e1eab2d
Nombre del módulo con errores: ntdll.dll
Versión del módulo con errores: 6.0.6002.18327
Marca de tiempo del módulo con errores: 4cb74dd3
Código de excepción: c0000005
Desplazamiento de excepción: 00000000000254fa
Versión del sistema operativo: 6.0.6002.2.2.0.272.7
Id. de configuración regional: 3082
Información adicional 1: be71
Información adicional 2: c446534487fac01001a0a6a8651eac8f
Información adicional 3: 22c3
Información adicional 4: 0e311a13715a228ff2649287f107f4d0

Hope this could help you


[ Download ]
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

Topic viewed 8372 times

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




|

Back to top

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

Got it!