在超级边界的第一个织物样本网络中,TLS概念有什么用?

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

我们如何在第一网络中实现TLS?我尝试在对等体中添加以下部分.Tls需要配置对等体吗?

CORE_PEER_TLS_ENABLED=true
CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt

我正在使用第一个结构网络样本网络进行多组织网络设置。组织中的一个人说org1通过传递orlrer的tls证书创建了一个频道,另一个组织org2必须获取org1创建的频道并将对等体加入到channel.when我通过传递orlrer的tls证书来使用对等通道获取来获取动作,我得到的错误就像

  peer channel fetch config-o orderer.example.com:7050 -c channelone1 -f --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem 
connection error: desc = "transport: Error while dialing dial tcp 98.124.199.121:7050: connect: connection refused". Reconnecting...

在orderer日志中,我收到错误:

TLS handshake failed with error tls: client didn't provide a certificate {"server": "Orderer", "remote address": "172.24.0.4:49608"} 

使用以下方式创建频道:

peer channel create -o orderer.example.com:7050 -c channelone1 -f ./channel-artifacts/channel-one.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem 

输出为:接收块为0

hyperledger-fabric hyperledger blockchain
1个回答
1
投票

默认情况下,第一个网络将在启用TLS的情况下启动。

您引用的四个环境变量包含在文件base/peer-base.yaml中,使用extends:file: base/docker-compose-base.yaml“包含”对等基础文件

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