From e75902ffbf36fbf84e17e25484557c285f945f37 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sun, 30 Aug 2015 19:42:33 -0400 Subject: [PATCH] Remove redundent assignment to InsecureSkipVerify This second codepath is redundent, since tlsConfig.InsecureSkipVerify is assigned to earlier in that function body. In addition, there's no need to wrap the assignment in a check on that boolean value in this case. Signed-off-by: Paul Tagliamonte --- utils/certs.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/certs.go b/utils/certs.go index f21606462a..87f9baaedb 100644 --- a/utils/certs.go +++ b/utils/certs.go @@ -27,9 +27,6 @@ func getTLSConfig(caCert, cert, key []byte, allowInsecure bool) (*tls.Config, er return &tlsConfig, err } tlsConfig.Certificates = []tls.Certificate{keypair} - if allowInsecure { - tlsConfig.InsecureSkipVerify = true - } return &tlsConfig, nil }