From f4e4d760788f32264b9524a1fe667be7ee394b75 Mon Sep 17 00:00:00 2001 From: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:04:50 -0800 Subject: [PATCH] Set ServerName for tls config --- eks/oidc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eks/oidc.go b/eks/oidc.go index 9da8e0d..3bf82aa 100644 --- a/eks/oidc.go +++ b/eks/oidc.go @@ -96,7 +96,7 @@ func getThumbprint(jwksURL string) (string, error) { hostname = net.JoinHostPort(hostname, "443") } - tlsConfig := tls.Config{} + tlsConfig := tls.Config{ServerName: parsedURL.Host} conn, err := tls.Dial("tcp", hostname, &tlsConfig) if err != nil { return "", errors.WithStackTrace(err)