Skip to content

Commit

Permalink
[FAB-3643] respect peer.gossip.endpoint configuration
Browse files Browse the repository at this point in the history
This patch re-adds processing that optionally assigns
peer.gossip.endpoint to our internal endpoint representation.

Without this, enabling TLS is difficult because we cannot
control the endpoint representation at runtime in a deterministic
manner.  The end result is that x509 CN/SAN validation is
likely to fail and thus our endpoint is unreachable.

Fixes FAB-3643

Change-Id: Idd52bf55d86f87160ba508329ce379d1f3be5d04
Signed-off-by: Greg Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed May 3, 2017
1 parent 2f55f4a commit 2ccbb53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gossip/service/gossip_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func InitGossipServiceCustomDeliveryFactory(peerIdentity []byte, endpoint string
factory DeliveryServiceFactory, mcs api.MessageCryptoService, secAdv api.SecurityAdvisor,
secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) {
once.Do(func() {
if overrideEndpoint := viper.GetString("peer.gossip.endpoint"); overrideEndpoint != "" {
endpoint = overrideEndpoint
}

logger.Info("Initialize gossip with endpoint", endpoint, "and bootstrap set", bootPeers)

idMapper := identity.NewIdentityMapper(mcs)
Expand Down

0 comments on commit 2ccbb53

Please sign in to comment.