Browse Source

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 <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 9 years ago
committed by Adam Langley
parent
commit
399e7c94bf
4 changed files with 23 additions and 23 deletions
  1. +1
    -1
      ssl/test/runner/common.go
  2. +2
    -2
      ssl/test/runner/handshake_messages.go
  3. +2
    -2
      ssl/test/runner/handshake_server.go
  4. +18
    -18
      ssl/test/runner/runner.go

+ 1
- 1
ssl/test/runner/common.go View File

@@ -82,7 +82,7 @@ const (
extensionSignedCertificateTimestamp uint16 = 18 extensionSignedCertificateTimestamp uint16 = 18
extensionExtendedMasterSecret uint16 = 23 extensionExtendedMasterSecret uint16 = 23
extensionSessionTicket uint16 = 35 extensionSessionTicket uint16 = 35
extensionCustom uint16 = 1234 // not IANA assigned
extensionCustom uint16 = 1234 // not IANA assigned
extensionNextProtoNeg uint16 = 13172 // not IANA assigned extensionNextProtoNeg uint16 = 13172 // not IANA assigned
extensionRenegotiationInfo uint16 = 0xff01 extensionRenegotiationInfo uint16 = 0xff01
extensionChannelID uint16 = 30032 // not IANA assigned extensionChannelID uint16 = 30032 // not IANA assigned


+ 2
- 2
ssl/test/runner/handshake_messages.go View File

@@ -388,7 +388,7 @@ func (m *clientHelloMsg) marshal() []byte {
z[2] = byte(l >> 8) z[2] = byte(l >> 8)
z[3] = byte(l & 0xff) z[3] = byte(l & 0xff)
copy(z[4:], []byte(m.customExtension)) copy(z[4:], []byte(m.customExtension))
z = z[4 + l:]
z = z[4+l:]
} }


m.raw = x m.raw = x
@@ -839,7 +839,7 @@ func (m *serverHelloMsg) marshal() []byte {
z[2] = byte(l >> 8) z[2] = byte(l >> 8)
z[3] = byte(l & 0xff) z[3] = byte(l & 0xff)
copy(z[4:], []byte(m.customExtension)) copy(z[4:], []byte(m.customExtension))
z = z[4 + l:]
z = z[4+l:]
} }


m.raw = x m.raw = x


+ 2
- 2
ssl/test/runner/handshake_server.go View File

@@ -210,8 +210,8 @@ func (hs *serverHandshakeState) readClientHello() (isResume bool, err error) {
} }
c.haveVers = true c.haveVers = true


hs.hello = &serverHelloMsg {
isDTLS: c.isDTLS,
hs.hello = &serverHelloMsg{
isDTLS: c.isDTLS,
customExtension: config.Bugs.CustomExtension, customExtension: config.Bugs.CustomExtension,
} }




+ 18
- 18
ssl/test/runner/runner.go View File

@@ -3661,10 +3661,10 @@ func addCustomExtensionTests() {


testCases = append(testCases, testCase{ testCases = append(testCases, testCase{
testType: testType, testType: testType,
name: "CustomExtensions-" + suffix,
name: "CustomExtensions-" + suffix,
config: Config{ config: Config{
Bugs: ProtocolBugs {
CustomExtension: expectedContents,
Bugs: ProtocolBugs{
CustomExtension: expectedContents,
ExpectedCustomExtension: &expectedContents, ExpectedCustomExtension: &expectedContents,
}, },
}, },
@@ -3674,30 +3674,30 @@ func addCustomExtensionTests() {
// If the parse callback fails, the handshake should also fail. // If the parse callback fails, the handshake should also fail.
testCases = append(testCases, testCase{ testCases = append(testCases, testCase{
testType: testType, testType: testType,
name: "CustomExtensions-ParseError-" + suffix,
name: "CustomExtensions-ParseError-" + suffix,
config: Config{ config: Config{
Bugs: ProtocolBugs {
CustomExtension: expectedContents + "foo",
Bugs: ProtocolBugs{
CustomExtension: expectedContents + "foo",
ExpectedCustomExtension: &expectedContents, ExpectedCustomExtension: &expectedContents,
}, },
}, },
flags: []string{flag},
shouldFail: true,
flags: []string{flag},
shouldFail: true,
expectedError: ":CUSTOM_EXTENSION_ERROR:", expectedError: ":CUSTOM_EXTENSION_ERROR:",
}) })


// If the add callback fails, the handshake should also fail. // If the add callback fails, the handshake should also fail.
testCases = append(testCases, testCase{ testCases = append(testCases, testCase{
testType: testType, testType: testType,
name: "CustomExtensions-FailAdd-" + suffix,
name: "CustomExtensions-FailAdd-" + suffix,
config: Config{ config: Config{
Bugs: ProtocolBugs {
CustomExtension: expectedContents,
Bugs: ProtocolBugs{
CustomExtension: expectedContents,
ExpectedCustomExtension: &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:", expectedError: ":CUSTOM_EXTENSION_ERROR:",
}) })


@@ -3711,10 +3711,10 @@ func addCustomExtensionTests() {
} }
testCases = append(testCases, testCase{ testCases = append(testCases, testCase{
testType: testType, testType: testType,
name: "CustomExtensions-Skip-" + suffix,
name: "CustomExtensions-Skip-" + suffix,
config: Config{ config: Config{
Bugs: ProtocolBugs {
CustomExtension: skipCustomExtension,
Bugs: ProtocolBugs{
CustomExtension: skipCustomExtension,
ExpectedCustomExtension: &emptyString, ExpectedCustomExtension: &emptyString,
}, },
}, },
@@ -3726,9 +3726,9 @@ func addCustomExtensionTests() {
// doesn't send the extension. // doesn't send the extension.
testCases = append(testCases, testCase{ testCases = append(testCases, testCase{
testType: serverTest, testType: serverTest,
name: "CustomExtensions-NotCalled-Server",
name: "CustomExtensions-NotCalled-Server",
config: Config{ config: Config{
Bugs: ProtocolBugs {
Bugs: ProtocolBugs{
ExpectedCustomExtension: &emptyString, ExpectedCustomExtension: &emptyString,
}, },
}, },


Loading…
Cancel
Save