Re: Using Private Data in Fabric #hyperledger-fabric @ version 2.2 #hyperledger-fabric

Tom Lamm

Yes it does, the question is which .pem file??? That file's location depends on how you set up your directories.

Hyperledger eats, breathes,  and sweats certificates and keys. Understanding how they interact is vital.

If all you want to do is make that command work and move on, poke around and you will find the correct .pem file.

If you want to understand how Hyperledger works, you need to understand how x509 certifications work and the structure of the hierarchy of certification. I personally had to take a side trip in my learning to learn more about x509 certs and ssl in general. The Hyperledger tutorial docs seemed, to me, to just leave this as a "follow these steps and it should work" approach. By taking that side-trip I came to understand WHY it "should work", how to use the openssl command to examine the certifications, etc. 

Not what you want to hear, I'm sure, but I did not really "get" how all of these certs interact until I did that.


On 1/30/2022 6:15:38 AM, satheesh via <> wrote:


Looks like ORDERER_CA variable needs to be defined with the location of .pem file


On Sunday, January 30, 2022, 05:27:46 PM GMT+5:30, asaduzzaman.rakib.10@... <asaduzzaman.rakib.10@...> wrote:

I stuck on official tutorial part 5 - "Using Private Data in Fabric" - (I have used fabric version 2.2) -:
While executing this following command I got the error : 
peer lifecycle chaincode approveformyorg -o localhost:7050 --ordererTLSHostnameOverride --channelID mychannel --name private --version 1.0 --collections-config ../asset-transfer-private-data/chaincode-go/collections_config.json --signature-policy "OR('Org1MSP.member','Org2MSP.member')" --package-id $CC_PACKAGE_ID --sequence 1 --tls --cafile $ORDERER_CA
Error message:
Error: flag needs an argument: --cafile

Join { to automatically receive all group messages.