Commit ab2aca5e authored by Adam Langley's avatar Adam Langley

crypto/tls: select best ciphersuite, not worst.

Previously, the outer loop would continue until we selected the
client's least preferable ciphersuite.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4029056
parent 566d432f
......@@ -57,6 +57,7 @@ Curves:
var suite *cipherSuite
var suiteId uint16
FindCipherSuite:
for _, id := range clientHello.cipherSuites {
for _, supported := range config.cipherSuites() {
if id == supported {
......@@ -67,7 +68,7 @@ Curves:
continue
}
suiteId = id
break
break FindCipherSuite
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment