具有 HTTPS 访问权限的 Yubico YubiHSM2 连接器

问题描述

我使用 Win10 进行实验。 我想在 yubihsm-shell 和 yubihsm-connector 之间创建 HTTPS 访问。 Official guidelines 不是很详细,但过了一会儿我在 https://github.com/Yubico/yubihsm-shell/issues/5

中找到了一些相关信息

我使用了 openssl 并创建了私钥 (privkey.pem)、证书签名请求 (csr.csr) 和证书 (hsm_cert.pem)。证书是自签名的。

我通过以下方式启动了 yubihsm 连接器:

yubihsm-connector.exe -d -l localhost:54321 --cert=hsm_cert.pem --key=privkey.pem

我打开我的网络浏览器并输入 URL:

https://localhost:54321/connector/status

我收到正确的消息:

status=OK
serial=*
version=3.0.1
pid=12920
address=localhost
port=54321

接下来我通过以下方式尝试了 yubishell: yubihsm-shell.exe --connector=https://localhost:54321 --cacert=hsm_cert.pem yubihsm> 连接 HTTPS CA 设置失败

我提供给 yubihsm shell 的证书与我开始连接器时使用的自签名证书相同。

证书签名请求是使用以下配置文件创建的:

[ req ]
default_bits        = 2048
distinguished_name  = req_distinguished_name
req_extensions = v3_req

[ req_distinguished_name ]
countryName                    = #deleted-due-to-privacy
countryName_default            = #deleted-due-to-privacy
countryName_min                = 2
countryName_max                = 2

localityName                   = #deleted-due-to-privacy

organizationalUnitName         = #deleted-due-to-privacy

commonName                     = localhost
commonName_max                 = 64
emailAddress                   = #deleted-due-to-privacy
emailAddress_max               = 40

[ v3_req ]
basicConstraints = CA:TRUE
keyUsage = digitalSignature,keyCertSign

证书扩展文件看起来像:

authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:TRUE
keyUsage = digitalSignature,nonRepudiation,keyCertSign,keyAgreement

我的问题:

  1. 如何为 yubihsm 连接器创建 X509 证书?
  2. 我应该如何向 yubihsm shell 提供证书,以便它可以通过 HTTPS 连接到连接器?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)