From 8c0133aeb36d6f384498986ed2cf4c67431f1d16 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 26 Dec 2018 12:33:49 -0500 Subject: tls-getcernts: Support SNI --- bin-src/tls-getcerts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin-src/tls-getcerts.go b/bin-src/tls-getcerts.go index 34e25e5..bfc0b5b 100644 --- a/bin-src/tls-getcerts.go +++ b/bin-src/tls-getcerts.go @@ -141,7 +141,7 @@ func getcert(socket string) (*x509.Certificate, error) { return nil, fmt.Errorf("Unknown negotiation path: %q", u.Path) } - connTLS := tls.Client(connRaw, &tls.Config{InsecureSkipVerify: true}) + connTLS := tls.Client(connRaw, &tls.Config{ServerName: host, InsecureSkipVerify: true}) defer connTLS.Close() err = connTLS.Handshake() if err != nil { -- cgit v1.2.3-54-g00ecf