gpt4 book ai didi

openssl - 用于 openSSL 的 PKCS#11 引擎

转载 作者:行者123 更新时间:2023-12-05 01:45:36 38 4
gpt4 key购买 nike

我正在尝试在 Windows 7 下设置 openSSL 以使用供应商特定的安全模块。

我从供应商那里得到了一个 PKCS#11 API dll(比如说 vendor.dll)。PKCS#11 引擎已根据 https://github.com/OpenSC/libp11 创建

如链接中所述,为了测试,我开始

openssl engine 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

配置文件是:

[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

关于openssl - 用于 openSSL 的 PKCS#11 引擎,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41119744/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com