Skip to content

Commit

Permalink
Fix tls handshake failure with go1.22
Browse files Browse the repository at this point in the history
RSA KEX cipher suites has been marked insecure in go1.22.
See golang/go@dc5a0d2
  • Loading branch information
higebu committed Aug 5, 2024
1 parent 053837f commit cc4d48c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eapilib.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,18 @@ func (conn *HTTPSEapiConnection) send(data []byte) (*JSONRPCResponse, error) {
}
timeOut := time.Duration(time.Duration(conn.timeOut) * time.Second)
url := conn.getURL()
suites := []uint16{}
for _, suite := range tls.CipherSuites() {
suites = append(suites, suite.ID)
}
for _, suite := range tls.InsecureCipherSuites() {
suites = append(suites, suite.ID)
}
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
CipherSuites: suites,
},
DisableKeepAlives: conn.disableKeepAlive,
}
client := &http.Client{
Expand Down

0 comments on commit cc4d48c

Please sign in to comment.