Discussion:
Problem with OpenSSL and engine_pkcs11
Antonio Nastasi
2008-02-14 11:09:27 UTC
Permalink
Hi, I have compiled libp11 and engine_pkcs11 under windows with Visual C++ 2005 express + Microsoft Platform SDK. Now, when I test engine with openssl with this command:

OpenSSL> engine -t dynamic -pre SO_PATH:c:\windows\system32\engine_pkcs11.dll -p
re ID:pkcs11 -pre LIST_ADD:1 -pre LOAD -pre MODULE_PATH:d:\windows\system32\open
sc-pkcs11.dll
(dynamic) Dynamic engine loading support
[Success]: SO_PATH:c:\windows\system32\engine_pkcs11.dll
[Success]: ID:pkcs11
[Success]: LIST_ADD:1
[Failure]: LOAD
3664:error:25078067:DSO support routines:WIN32_LOAD:could not load the shared li
brary:.\crypto\dso\dso_win32.c:172:filename(c:\windows\system32\engine_pkcs11.dl
l)
3664:error:25070067:DSO support routines:DSO_load:could not load the shared libr
ary:.\crypto\dso\dso_lib.c:244:
3664:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:.\crypto\engine\e
ng_dyn.c:450:
[Failure]: MODULE_PATH:d:\windows\system32\opensc-pkcs11.dll
3664:error:260AC089:engine routines:INT_CTRL_HELPER:invalid cmd name:.\crypto\en
gine\eng_ctrl.c:134:
3664:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:.\cr
ypto\engine\eng_ctrl.c:316:

And one messagebox report: Runtime Error!
Program C:\Programmi\OpenSSL\bin\openssl.exe
R6034: An application has made an attempt to load the C runtime library incorrectly.


*** The opensc-pkcs11.dll works fine with Thunderbird and Firefox ****
I try also trunk svn of libp11 and engine_pkcs11 but I have some errors!
OpenSSL version is 0.9.8g. I have need of engine_pkcs11 for wpa_supplicant.
Have you some suggestions?
Peter Stuge
2008-02-14 15:58:32 UTC
Permalink
Post by Antonio Nastasi
Hi, I have compiled libp11 and engine_pkcs11 under windows with
Visual C++ 2005 express + Microsoft Platform SDK. Now, when I test
OpenSSL> engine -t dynamic
-pre SO_PATH:c:\windows\system32\engine_pkcs11.dll
Ok.
Post by Antonio Nastasi
-pre ID:pkcs11 -pre LIST_ADD:1 -pre LOAD
-pre MODULE_PATH:d:\windows\system32\opensc-pkcs11.dll
But here you're using d:\windows\system32. Why?
Post by Antonio Nastasi
[Failure]: MODULE_PATH:d:\windows\system32\opensc-pkcs11.dll
And indeed the file is not found by openssl.
Post by Antonio Nastasi
Have you some suggestions?
Double check your paths.


//Peter
SiFcenter
2008-02-14 17:28:53 UTC
Permalink
Post by Peter Stuge
But here you're using d:\windows\system32. Why?
* 3664:error:260B6084:engine routines:DYNAMIC_LOAD:dso not
found:.\crypto\engine\eng_dyn.c:450:
*>* [Failure]: MODULE_PATH:d:\windows\system32\opensc-pkcs11.dll
*
Post by Peter Stuge
And indeed the file is not found by openssl.
The paths are correct. The problem must be other....
Antonio Nastasi
2008-02-14 19:11:45 UTC
Permalink
Post by Peter Stuge
But here you're using d:\windows\system32. Why?
/>/ [Failure]: MODULE_PATH:d:\windows\system32\opensc-pkcs11.dll
/
Post by Peter Stuge
And indeed the file is not found by openssl.
The paths are correct. The problem must be other....
Ok I resolved with:
*mt.exe –manifest engine_pkcs11.dll.manifest
-outputresource:engine_pkcs11.dll;2*

Loading...