【发布时间】:2020-10-27 15:55:37
【问题描述】:
我为泰雷兹提供的 Hyperledger Fabric 创建了 HSM 按需服务。
-
使用 Thales 门户创建 HSM 服务。
-
创建的 HSM 客户端,我们使用它连接到创建的 HSM 服务。
-
使用以下详细信息更新了 fabric-ca-server 配置文件中的 bccsp 部分。
default: PKCS11 pkcs11: Library: =/etc/hyperledger/fabric/dpod/org1.example.com/libs/64/libCryptoki2.so Pin: "*****" Label: testhsm hash: SHA2 security: 256 Immutable: false filekeystore: # The directory used for the software file-based keystore keystore: msp/keystore -
使用命令
source ./setenv获取 HSM 客户端 zip 附带的 setenv 文件 -
使用
fabric-ca-server start将 fabric-ca-server 作为本机进程启动 - 服务器可以成功连接到 HSM 服务。 -
尝试在 docker 容器中启动 fabric-ca-server,卷挂载了整个 HSM 客户端 zip,并设置了 $ChrystokiConfigurationPath。
在启动fabric ca server docker容器时,它会抛出错误Error: Failed to get BCCSP with opts: Could not initialize BCCSP PKCS11: Failed initializing PKCS11 library =/etc/hyperledger/fabric/dpod/org1.example.com/libs/64/libCryptoki2.so testhsm: Instantiate failed [=/etc/hyperledger/fabric/dpod/org1.example.com/libs/64/libCryptoki2.so]
【问题讨论】:
标签: docker dockerfile hyperledger-fabric hsm