mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/tls: don't rely on map iteration order.
Previously we were using the map iteration order to set the order of the cipher suites in the ClientHello. R=bradfitz CC=golang-dev https://golang.org/cl/5440048
This commit is contained in:
parent
5f6027e9ad
commit
1eb7ca924b
4 changed files with 33 additions and 22 deletions
|
|
@ -315,9 +315,7 @@ var (
|
|||
|
||||
func initDefaultCipherSuites() {
|
||||
varDefaultCipherSuites = make([]uint16, len(cipherSuites))
|
||||
i := 0
|
||||
for id := range cipherSuites {
|
||||
varDefaultCipherSuites[i] = id
|
||||
i++
|
||||
for i, suite := range cipherSuites {
|
||||
varDefaultCipherSuites[i] = suite.id
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue