From 399e7c94bfac09a64db3aff020952ee2f8363c56 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 30 Jul 2015 23:01:27 -0400 Subject: [PATCH] Run go fmt on runner. That got out of sync at some point. Change-Id: I5a45f50f330ceb65053181afc916053a80aa2c5d Reviewed-on: https://boringssl-review.googlesource.com/5541 Reviewed-by: Adam Langley --- ssl/test/runner/common.go | 2 +- ssl/test/runner/handshake_messages.go | 4 +-- ssl/test/runner/handshake_server.go | 4 +-- ssl/test/runner/runner.go | 36 +++++++++++++-------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ssl/test/runner/common.go b/ssl/test/runner/common.go index 7b7a35bb..ddd0468d 100644 --- a/ssl/test/runner/common.go +++ b/ssl/test/runner/common.go @@ -82,7 +82,7 @@ const ( extensionSignedCertificateTimestamp uint16 = 18 extensionExtendedMasterSecret uint16 = 23 extensionSessionTicket uint16 = 35 - extensionCustom uint16 = 1234 // not IANA assigned + extensionCustom uint16 = 1234 // not IANA assigned extensionNextProtoNeg uint16 = 13172 // not IANA assigned extensionRenegotiationInfo uint16 = 0xff01 extensionChannelID uint16 = 30032 // not IANA assigned diff --git a/ssl/test/runner/handshake_messages.go b/ssl/test/runner/handshake_messages.go index 92f603ae..f5303a65 100644 --- a/ssl/test/runner/handshake_messages.go +++ b/ssl/test/runner/handshake_messages.go @@ -388,7 +388,7 @@ func (m *clientHelloMsg) marshal() []byte { z[2] = byte(l >> 8) z[3] = byte(l & 0xff) copy(z[4:], []byte(m.customExtension)) - z = z[4 + l:] + z = z[4+l:] } m.raw = x @@ -839,7 +839,7 @@ func (m *serverHelloMsg) marshal() []byte { z[2] = byte(l >> 8) z[3] = byte(l & 0xff) copy(z[4:], []byte(m.customExtension)) - z = z[4 + l:] + z = z[4+l:] } m.raw = x diff --git a/ssl/test/runner/handshake_server.go b/ssl/test/runner/handshake_server.go index 7686402e..34828aef 100644 --- a/ssl/test/runner/handshake_server.go +++ b/ssl/test/runner/handshake_server.go @@ -210,8 +210,8 @@ func (hs *serverHandshakeState) readClientHello() (isResume bool, err error) { } c.haveVers = true - hs.hello = &serverHelloMsg { - isDTLS: c.isDTLS, + hs.hello = &serverHelloMsg{ + isDTLS: c.isDTLS, customExtension: config.Bugs.CustomExtension, } diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index 35d0bc61..1121dacd 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -3661,10 +3661,10 @@ func addCustomExtensionTests() { testCases = append(testCases, testCase{ testType: testType, - name: "CustomExtensions-" + suffix, + name: "CustomExtensions-" + suffix, config: Config{ - Bugs: ProtocolBugs { - CustomExtension: expectedContents, + Bugs: ProtocolBugs{ + CustomExtension: expectedContents, ExpectedCustomExtension: &expectedContents, }, }, @@ -3674,30 +3674,30 @@ func addCustomExtensionTests() { // If the parse callback fails, the handshake should also fail. testCases = append(testCases, testCase{ testType: testType, - name: "CustomExtensions-ParseError-" + suffix, + name: "CustomExtensions-ParseError-" + suffix, config: Config{ - Bugs: ProtocolBugs { - CustomExtension: expectedContents + "foo", + Bugs: ProtocolBugs{ + CustomExtension: expectedContents + "foo", ExpectedCustomExtension: &expectedContents, }, }, - flags: []string{flag}, - shouldFail: true, + flags: []string{flag}, + shouldFail: true, expectedError: ":CUSTOM_EXTENSION_ERROR:", }) // If the add callback fails, the handshake should also fail. testCases = append(testCases, testCase{ testType: testType, - name: "CustomExtensions-FailAdd-" + suffix, + name: "CustomExtensions-FailAdd-" + suffix, config: Config{ - Bugs: ProtocolBugs { - CustomExtension: expectedContents, + Bugs: ProtocolBugs{ + CustomExtension: expectedContents, ExpectedCustomExtension: &expectedContents, }, }, - flags: []string{flag, "-custom-extension-fail-add"}, - shouldFail: true, + flags: []string{flag, "-custom-extension-fail-add"}, + shouldFail: true, expectedError: ":CUSTOM_EXTENSION_ERROR:", }) @@ -3711,10 +3711,10 @@ func addCustomExtensionTests() { } testCases = append(testCases, testCase{ testType: testType, - name: "CustomExtensions-Skip-" + suffix, + name: "CustomExtensions-Skip-" + suffix, config: Config{ - Bugs: ProtocolBugs { - CustomExtension: skipCustomExtension, + Bugs: ProtocolBugs{ + CustomExtension: skipCustomExtension, ExpectedCustomExtension: &emptyString, }, }, @@ -3726,9 +3726,9 @@ func addCustomExtensionTests() { // doesn't send the extension. testCases = append(testCases, testCase{ testType: serverTest, - name: "CustomExtensions-NotCalled-Server", + name: "CustomExtensions-NotCalled-Server", config: Config{ - Bugs: ProtocolBugs { + Bugs: ProtocolBugs{ ExpectedCustomExtension: &emptyString, }, },