-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/tls: https request, tls handshake failure in go1.22 #66512
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
Comments
@golang/security This seems to depend on the https host I am trying to connect to. I tried this connecting to a google.com and it worked okay. |
I found the tls.Config CipherSuite parameter description in the source code, which may be related to the issue. |
Apologies for commenting on a closed issue, but it might help to manually specify ciphers instead of using the GODEBUG setting Config := &tls.Config{
CipherSuites: []uint16{
// TLS 1.0 - 1.2 cipher suites.
tls.TLS_RSA_WITH_RC4_128_SHA,
tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA,
tls.TLS_RSA_WITH_AES_128_CBC_SHA,
tls.TLS_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_RSA_WITH_AES_128_CBC_SHA256,
tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA,
tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
// TLS 1.3 cipher suites.
tls.TLS_AES_128_GCM_SHA256,
tls.TLS_AES_256_GCM_SHA384,
tls.TLS_CHACHA20_POLY1305_SHA256,
},
}
httpClient = &http.Client{Transport: &http.Transport{TLSClientConfig: tlsConfig}} |
NB: go 1.22.0 does not accept TLS1.2 ciphers See: golang/go#66512 SpectoLabs/hoverfly#1162 Modify GetTLSConfig @ go-irodsclient/irods/types/ssl_config.go
Go version
go version go1.22.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
panic: Get "https://www.scort.cn": remote error: tls: handshake failure
What did you expect to see?
status: 200
In versions go1.21 and earlier, this success result is returned. But it returned an error in version go1.22
The text was updated successfully, but these errors were encountered: