1
0
mirror of https://github.com/fumiama/terasu.git synced 2026-06-11 21:50:37 +08:00

feat: limit tls minversion to 1.2

This commit is contained in:
源文雨
2025-10-06 10:51:44 +08:00
parent 2732915dda
commit 2e34cdfed3
4 changed files with 12 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ func TestHTTPDialTLS13(t *testing.T) {
t.Log("net.Dial succeeded")
tlsConn := tls.Client(conn, &tls.Config{
ServerName: "huggingface.co",
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
})
err = Use(tlsConn).Handshake(4)
@@ -57,6 +58,7 @@ func TestHTTPDialTLS12(t *testing.T) {
tlsConn := tls.Client(conn, &tls.Config{
ServerName: "huggingface.co",
InsecureSkipVerify: true,
MinVersion: tls.VersionTLS12,
MaxVersion: tls.VersionTLS12,
})
err = Use(tlsConn).Handshake(4)