http2: fix TLS1.0 and TLS1.1 rejection tests
Fixes golang/go#49442
Change-Id: Idb447aa5d33ba312ce28d8ed7f741be652075b4e
Reviewed-on: https://go-review.googlesource.com/c/net/+/362314
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/http2/server_test.go b/http2/server_test.go
index 258d69e..23d8a62 100644
--- a/http2/server_test.go
+++ b/http2/server_test.go
@@ -2591,6 +2591,10 @@
func testRejectTLS(t *testing.T, max uint16) {
st := newServerTester(t, nil, func(c *tls.Config) {
+ // As of 1.18 the default minimum Go TLS version is
+ // 1.2. In order to test rejection of lower versions,
+ // manually set the minimum version to 1.0
+ c.MinVersion = tls.VersionTLS10
c.MaxVersion = max
})
defer st.Close()