我正在使用 cryptogen 为我正在构建的 Fabric 网络生成所有加密 Material 。我可以成功启动网络并部署链代码。但是,我在尝试注册新用户时遇到了问题。我正在遵循 asset-transfer-private-data 教程,部署链代码后,我运行
fabric-ca-client register --caname ca.org1 --id.name org1-client --id.secret org1-password --id.type client --mspdir ./config/crypto-config/peerOrganizations/org1/msp
并得到错误
2020/10/03 12:20:11 [INFO] Configuration file location: /home/user/network3.2/config/crypto-config/peerOrganizations/org1/fabric-ca-client-config.yaml
2020/10/03 12:20:11 [ERROR] Enrollment check failed: Idemix enrollment information does not exist
Error: Enrollment information does not exist. Please execute enroll command first. Example: fabric-ca-client enroll -u http://user:userpw@serverAddr:serverPort
没有fabric-ca-client-config.yaml 文件。我指定的 mspdir 具有目录 signcerts、keystore 和 cacerts,根据 Hyperledger Fabric: Enrollment check failed: Idemix enrollment information does not exist需要。但是,signcerts 和 keystore 目录都是空的,而它们应该分别包含公共(public)证书和私钥。
如何生成这些文件?谢谢。
最佳答案
cryptogen
是一个实用程序,可让您快速生成加密 Material 以开始使用。它与 Fabric CA 没有任何直接联系(有意)。
您唯一能做的就是利用为每个组织生成的 CA key 对(在 ca
文件夹下)作为启动 Fabric CA 实例时使用的根 key 对。
关于hyperledger-fabric - super 账本结构 : Why doesn't cryptogen generate all the necessary crypto material to register new users?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64188382/