我正在尝试在 Windows 7 下设置 openSSL 以使用供应商特定的安全模块。
我从供应商那里得到了一个 PKCS#11 API dll(比如说vendor.dll)。
PKCS#11 引擎是根据https://github.com/OpenSC/libp11 https://github.com/OpenSC/libp11
如链接中所述,为了测试,我开始
openssl 引擎 pkcs11 -t
but get:
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
配置文件是:
[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
它尝试在 unix 目录 \usr\local 中查找 dll...
看来,动态路径的内容根本没有被评估,因为我可以在那里指定任何内容,我总是收到上面的错误消息。
我究竟做错了什么?
在配置文件中的其他条目之前,您需要:
[openssl_def]
engines = engine_section
另一方面,不需要以下行:
engine_id = pkcs11
init = 0
还要检查(使用,例如ldd
)您引用的库实际上可以加载。如果找不到它们依赖的库,动态加载器将在它们上失败,然后尝试使用默认库路径,例如
/usr/local/ssl/lib/engines/<engine-id>.dll
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)