From aafbeeb29fbf1fe0ac456a4da75c2aa76943f184 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Mon, 26 May 2025 21:23:08 -0400 Subject: [PATCH] fmt --- client.go | 4 ++++ example/httpproxy/main.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 6055913..ba1ef7d 100644 --- a/client.go +++ b/client.go @@ -35,6 +35,10 @@ func NewMetaHTTPClient(rootCAs *x509.CertPool) *MetaHTTPClient { } // Use standard verification for all other domains + if len(state.PeerCertificates) == 0 { + return fmt.Errorf("no peer certificates provided") + } + opts := x509.VerifyOptions{ DNSName: state.ServerName, Intermediates: x509.NewCertPool(), diff --git a/example/httpproxy/main.go b/example/httpproxy/main.go index a03e5dc..baf3b5d 100644 --- a/example/httpproxy/main.go +++ b/example/httpproxy/main.go @@ -85,5 +85,4 @@ func main() { log.Println("Response Status:", resp.Status) }(conn) } - }