无法在fabric-ca中启用启用了tls的对等方注册

问题描述 投票:0回答:1

我正在尝试在启用fabric-ca的情况下设置tls。启动服务器,成功注册启用tls的admin。但是,当我尝试注册用户时,出现错误

POST https://peer2:7054/register
{"id":"sound","type":"client","affiliation":"org0.department1","attrs":[{"name":"hf.Revoker","value":"true"},{"name":"admin","value":"true","ecert":true}]}
2019/12/10 07:32:33 [DEBUG] Received response statusCode=403 (403 Forbidden)
Error: Response from server: Error Code: 71 - Authorization failure

https://peer2-peer2表示拥有admin enroll命令中提到的根证书的主机。谁能指导启用tls的fabric-ca注册。

我用于注册用户的命令是:

fabric-ca-client register -d --id.name sound --id.affiliation org0.department1 --id.attrs 'hf.Revoker=true,admin=true:ecert' --tls.certfiles /root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer2.org0/tls/ca.crt --tls.client.certfile /root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer2.org0/tls/server.crt --tls.client.keyfile /root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer2.org0/tls/server.key
ssl hyperledger-fabric hyperledger-fabric-ca
1个回答
0
投票

首先,您的CA必须具有TLS_ENABLES = true并使用tls证书映射路径。

接下来,在命令中您可能会丢失

-tls true

-clientauth

我有一个启用了TLS的cli和启用了TLS的CA,当我想注册一个新用户时,我在命令行中使用了这些选项,也添加了密钥文件和certfile。

© www.soinside.com 2019 - 2024. All rights reserved.