Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

affected/package: http.Client,tls.Config. InsecureSkipVerify: true not work with go1.18 #51702

Closed
hongnod opened this issue Mar 16, 2022 · 1 comment

Comments

@hongnod
Copy link

hongnod commented Mar 16, 2022

What version of Go are you using (go version)?

go version go1.18 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOHOSTARCH=amd64
set GOHOSTOS=windows

What did you do?

client := &http.Client{
	Transport: &http.Transport{
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: true, // test server certificate is not trusted.
		},
	},
	Jar: NewJar(),
}

req, err := http.NewRequest("GET", "url", nil)
if err != nil {
	log.Fatal(err)
}
get_resp, err := client.Do(req)
if err != nil {
	log.Fatal(err)
}

What did you expect to see?

do request successfully.

What did you see instead?

tls: server selected unsupported protocol version 301
go 1.17.8 without such problem

@hongnod hongnod changed the title affected/package: affected/package: http.Client,tls.Config. InsecureSkipVerify: true not work with go1.18 Mar 16, 2022
@seankhliao
Copy link
Member

https://go.dev/doc/go1.18#tls10

closing as working as intended

@golang golang locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants