mic*_*ael 3 openssl pkcs#11 hardware-security-module
我正在尝试在 Windows 7 下设置 openSSL 以使用供应商特定的安全模块。
我从供应商那里得到了一个 PKCS#11 API dll(比如说vendor.dll)。PKCS#11引擎已根据https://github.com/OpenSC/libp11创建
如链接中所述,为了测试,我开始
openssl 引擎 pkcs11 -t
但得到:
D:\Gateway\openSSL\Win32\Release>openssl engine pkcs11 -t
11020:error:25078067:DSO support routines:WIN32_LOAD:could not load the shared library:.\crypto\dso\dso_win32.c:179:filename(\usr\local\ssl\lib\engines\pkcs11.dll)
11020:error:25070067:DSO support routines:DSO_load:could not load the shared library:.\crypto\dso\dso_lib.c:233:
11020:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:.\crypto\engine\eng_dyn.c:467:
11020:error:2606A074:engine routines:ENGINE_by_id:no such engine:.\crypto\engine\eng_list.c:390:id=pkcs11
Run Code Online (Sandbox Code Playgroud)
配置文件是:
[engine_section]
pkcs11 = pkcs11_section
[pkcs11_section]
engine_id = pkcs11
dynamic_path = D:\Gateway\libp11\libp11-master\src\pkcs11.dll
MODULE_PATH = D:\Gateway\driver\smgw\Win32\vendor.dll
init = 0
Run Code Online (Sandbox Code Playgroud)
它尝试在 unix 目录 \usr\local 中查找 dll... 看来,动态路径的内容根本没有被评估,因为我可以在那里指定任何内容,我总是收到上面的错误消息。
我究竟做错了什么?
小智 6
在配置文件中的其他条目之前,您需要:
[openssl_def]
engines = engine_section
Run Code Online (Sandbox Code Playgroud)
另一方面,不需要以下行:
engine_id = pkcs11
init = 0
Run Code Online (Sandbox Code Playgroud)
还要检查(使用例如ldd)您引用的库实际上可以加载。如果找不到它们依赖的库,动态加载器将在它们上失败,然后尝试使用默认库路径,例如
/usr/local/ssl/lib/engines/<engine-id>.dll
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11488 次 |
| 最近记录: |