Skip to content

Commit 2ccbb53

Browse files
committed
[FAB-3643] respect peer.gossip.endpoint configuration
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 <[email protected]>
1 parent 2f55f4a commit 2ccbb53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gossip/service/gossip_service.go

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ func InitGossipServiceCustomDeliveryFactory(peerIdentity []byte, endpoint string
135135
factory DeliveryServiceFactory, mcs api.MessageCryptoService, secAdv api.SecurityAdvisor,
136136
secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) {
137137
once.Do(func() {
138+
if overrideEndpoint := viper.GetString("peer.gossip.endpoint"); overrideEndpoint != "" {
139+
endpoint = overrideEndpoint
140+
}
141+
138142
logger.Info("Initialize gossip with endpoint", endpoint, "and bootstrap set", bootPeers)
139143

140144
idMapper := identity.NewIdentityMapper(mcs)

0 commit comments

Comments
 (0)