目前,我有一个问题要用HSM安装我的Mac。
电流配置
HSM: SoftHSM
OpenSSL, PKCS11
OS: MacOS Catalina我正在使用这个配置
openssl_conf = openssl_init
[openssl_init]
engines = engine_section
[engine_section]
pkcs11 = pkcs11_section
[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/local/Cellar/libp11/0.4.11/lib/engines-1.1/pkcs11.dylib
MODULE_PATH = /usr/local/lib/softhsm/libsofthsm2.so
init = 0
[ req ]
distinguished_name = req_dn
[ req_dn ]
commonName = foobar然后我尝试使用这个cmd从HSM生成认证
OPENSSL_CONF=engine.conf openssl req -new -x509 -subj "/CN=MyCertTEST" -engine pkcs11 -keyform engine -key "pkcs11:object=mykey1;pin-value=mysecret1" -outform der -out mycert.der 注意:我已经设置了HSM的密钥
看上去好像是个错误
Error configuring OpenSSL
4569882220:error:26FFF074:engine routines:CRYPTO_internal:no such engine:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/engine/eng_list.c:367:id=dynamic
4569882220:error:26FFF066:engine routines:CRYPTO_internal:engine configuration error:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/engine/eng_cnf.c:197:section=pkcs11_section, name=dynamic_path, value=/usr/local/Cellar/libp11/0.4.11/lib/engines-1.1/pkcs11.dylib
4569882220:error:0EFFF06D:configuration file routines:CRYPTO_internal:module initialization error:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/conf/conf_mod.c:224:module=engines, value=engine_section, retcode=-1
failed to load configuration不知道我在配置部分丢失了什么,或者对配置引擎的方式有什么误解
有人能指点我吗。谢谢
发布于 2020-11-24 17:49:51
您所看到的这种行为很可能是由于较新的macOS发行版默认使用LibreSSL造成的。
您可以通过运行
openssl version在你的终点站。
从您的OpenSSL配置文件中,我可以看到您已经在使用brew,这意味着您可以简单地安装openssl包并使用它。至少对我来说是这样的。
也许还有一种使用LibreSSL安装的方法,但我不知道如何安装。
https://unix.stackexchange.com/questions/617732
复制相似问题