]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: remove superfluous for label
authorFilippo Valsorda <filippo@golang.org>
Tue, 22 Jan 2019 21:21:32 +0000 (16:21 -0500)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 26 Feb 2019 18:38:04 +0000 (18:38 +0000)
Change-Id: I8ea3043fcbaf7a5f73b2a796171a7f1cb3cb3693
Reviewed-on: https://go-review.googlesource.com/c/158818
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/tls/handshake_client.go

index ca74989f6ed0b2c9972c26b63cdb1f5adab4e34f..31bd069bbcd7c6ef08255e3bac2b4abd097b335c 100644 (file)
@@ -85,7 +85,6 @@ func (c *Conn) makeClientHello() (*clientHelloMsg, ecdheParameters, error) {
        possibleCipherSuites := config.cipherSuites()
        hello.cipherSuites = make([]uint16, 0, len(possibleCipherSuites))
 
-NextCipherSuite:
        for _, suiteId := range possibleCipherSuites {
                for _, suite := range cipherSuites {
                        if suite.id != suiteId {
@@ -94,10 +93,10 @@ NextCipherSuite:
                        // Don't advertise TLS 1.2-only cipher suites unless
                        // we're attempting TLS 1.2.
                        if hello.vers < VersionTLS12 && suite.flags&suiteTLS12 != 0 {
-                               continue
+                               break
                        }
                        hello.cipherSuites = append(hello.cipherSuites, suiteId)
-                       continue NextCipherSuite
+                       break
                }
        }