Fabric when register the user give error Error: Calling register endpoint failed with error [Error: unable to verify the first certificate]

Fabric when register the user give error Error: Calling register endpoint failed with error [Error: unable to verify the first certificate]

我是 运行 使用 docker 容器的 fabric ca,当我注册管理员时,它运行良好,但是当我尝试注册新用户时,它会抛出错误,如下所示。我正在使用结构节点注册用户。

Error: Calling register endpoint failed with error [Error: unable to verify the first certificate]

docker 文件

ca0:
image: hyperledger/fabric-ca
environment:
  - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  - FABRIC_CA_SERVER_TLS_ENABLED=true
  - FABRIC_CA_SERVER_CA_NAME=ca.example.com
ports:
  - "7054:7054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
  - ./fabric-ca-server/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml
container_name: ca_peerOrg1
networks:
  - byfn

在我的节点中connection.json

 "certificateAuthorities": {
    "ca.example.com": {
        "url": "https://127.0.0.1:7054",
        "caName": "ca.example.com"
    },

您的 connection.json 中缺少 tlsCACerts 参数以允许您的 CA TLS 证书。