fablo icon indicating copy to clipboard operation
fablo copied to clipboard

The same peer certificates for one org?

Open dzikowski opened this issue 5 years ago • 1 comments

#!/bin/sh

peer="peer1.org1.com"
channel="my-channel2"
chaincode="chaincode1"
command='{"Args":["KVContract:get", "name"]}'

docker exec "cli.org1.com" peer chaincode invoke \
  --peerAddresses "$peer:7051" \
  --tlsRootCertFiles "/var/hyperledger/cli/crypto/peers/peer1.org1.com/tls/ca.crt" \
  -C "$channel" \
  -n "$chaincode" \
  -c "$command" \
  --waitForEvent \
  --tls \
  --cafile "/var/hyperledger/cli/crypto/daTls/msp/tlscacerts/tlsca.root.com-cert.pem" \
  2>&1

in the line with --tlsRootCertFiles we can change peer1 with peer0 and everything will work since the content of files /var/hyperledger/cli/crypto/peers/peer1.org1.com/tls/ca.crt and /var/hyperledger/cli/crypto/peers/peer0.org1.com/tls/ca.crt is the same

dzikowski avatar Oct 19 '20 10:10 dzikowski

https://kctheservant.medium.com/tls-in-hyperledger-fabric-b38fccb8614c

Hejwo avatar Jan 28 '21 08:01 Hejwo