Closed cuiweixie closed 1 month ago
It's strange that using go1.21 doesn't work, but go1.22 or later does.
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
I think this is controlled by the GODEBUG setting tlsrsakex
where the default changed from enabled in go1.21 to disabled in go1.22.
I don't think there's anything to do here as the new behavior is more correct and we aren't going to change the default GODEBUG for a previous version.
main » GODEBUG=tlsrsakex=1 go1.22.5 run .
2024/07/19 12:18:46 dial failed: websocket: bad handshake
exit status 1
main » GODEBUG=tlsrsakex=0 go1.22.5 run .
2024/07/19 12:18:56 connection ok
thanks!
Go version
go version go1.22.4 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
go.mod
wss.go
What did you see happen?
What did you expect to see?
if change go mod to:
will result in: