From 328eb74cbb2e9c54d4103a472dd0712d37b7c123 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 18 Mar 2019 21:14:49 -0700 Subject: [PATCH] Fix regression in peer clients in TLS setups (#7391) Regression was introduced in eb69c4f946ce10f5996566f9ee4c550a3119aeae --- cmd/peer-rest-client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/peer-rest-client.go b/cmd/peer-rest-client.go index 5e2dceb28..260bbda01 100644 --- a/cmd/peer-rest-client.go +++ b/cmd/peer-rest-client.go @@ -410,7 +410,7 @@ func newPeerRESTClient(peer *xnet.Host) (*peerRESTClient, error) { var tlsConfig *tls.Config if globalIsSSL { tlsConfig = &tls.Config{ - ServerName: peer.String(), + ServerName: peer.Name, RootCAs: globalRootCAs, } }