mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/tls: pick ECDHE curves based on server preference.
Currently an ECDHE handshake uses the client's curve preference. This generally means that we use P-521. However, P-521's strength is mismatched with the rest of the cipher suite in most cases and we have a fast, constant-time implementation of P-256. With this change, Go servers will use P-256 where the client supports it although that can be overridden in the Config. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/66060043
This commit is contained in:
parent
e6e8945001
commit
db99a8faa8
30 changed files with 793 additions and 801 deletions
|
|
@ -121,7 +121,7 @@ func TestTLS12OnlyCipherSuites(t *testing.T) {
|
|||
TLS_RSA_WITH_RC4_128_SHA,
|
||||
},
|
||||
compressionMethods: []uint8{compressionNone},
|
||||
supportedCurves: []uint16{curveP256, curveP384, curveP521},
|
||||
supportedCurves: []CurveID{CurveP256, CurveP384, CurveP521},
|
||||
supportedPoints: []uint8{pointFormatUncompressed},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue