I am running a hyperledger network (1.3) consisting of 3 orgs. TLS is enabled on all components (so also the peer nodes).
I am using the fabric-go-sdk to trigger transactions.
In the log files of the fabric sdk I often get the following errors: [...]certificate signed by unknown authority[...]
This seems to happen when the sdk (that was initialized for peers of my own org) tries to contact other nodes on the network where it does not know the correct tls certificate.
I also understood, that the sdk starts a discovery service and tries to discover additional peers (e.g. peers of a channel).
But how does my sdk retrieve the tls ca certificates of these peers to be able to contact them?
What I found out so far is, that in the discovery service of the sdk there is a function that transform discovered peers to a PeerConfig by calling the PeerConfig() method :
func asPeer(ctx contextAPI.Client, endpoint *discclient.Peer){
// ....
peerConfig, found := ctx.EndpointConfig().PeerConfig(url)
// ....
}
But the PeerConfig function also has no idea what the tls ca cert of the discovered peer is and so cannot create a correct PeerConfig object by only looking at the provided url.
What is the correct way configuring my sdk to be able to speak to other peers? Where does the sdk get the tls ca certificates of the other orgs? Are they beeing discovered at all? Or do I have to provide them manually?