Skip to content

Commit

Permalink
Update test-network to use org level ca-cert.pem (hyperledger#609)
Browse files Browse the repository at this point in the history
Although test network scripts functionally worked, they demonstrated
some strange patterns around use of the ca cert.

This change makes it clear that the ca cert is configured and used
at the org level, and not related to any individual peer or orderer node.
Also that when connecting to individual servers, clients can pass the
org level CA cert as the root of trust when establishing TLS connections.

Signed-off-by: David Enyeart <[email protected]>
  • Loading branch information
denyeart authored Feb 2, 2022
1 parent 5d3cc66 commit 9e9b8d3
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 57 deletions.
4 changes: 2 additions & 2 deletions test-network/CHAINCODE_AS_A_SERVICE_TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Note that the order listed isn't mandatory. The key thing is that the containers
This sequence can be run as follows

```bash
./network.sh deployCCAAS -ccn basicts -ccp ../asset-transfer-basic/chaincode-typescript
./network.sh deployCCAAS -ccn basicts -ccp ../asset-transfer-basic/chaincode-typescript
```

This is very similar to the `deployCC` command, it needs the name, and path. But also needs to have the port the chaincode container is going use. As each container is on the `fabric-test` network, you might wish to alter this so there are no collisions with other chaincode containers.
Expand All @@ -59,7 +59,7 @@ To test things are working you can invoke the 'Contract Metadata' function. For

export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7051
export FABRIC_CFG_PATH=${PWD}/../config
Expand Down
Loading

0 comments on commit 9e9b8d3

Please sign in to comment.