run gofmt -s

This commit is contained in:
Marten Seemann
2018-02-23 23:38:08 +08:00
parent 598d023802
commit 86e57706df
9 changed files with 36 additions and 36 deletions

View File

@@ -95,8 +95,8 @@ var _ = Describe("Client Crypto Setup", func() {
BeforeEach(func() {
shloMap = map[Tag][]byte{
TagPUBS: []byte{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f},
TagVER: []byte{},
TagPUBS: {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f},
TagVER: {},
}
keyDerivation := func(forwardSecure bool, sharedSecret, nonces []byte, connID protocol.ConnectionID, chlo []byte, scfg []byte, cert []byte, divNonce []byte, pers protocol.Perspective) (crypto.AEAD, error) {
keyDerivationCalledWith = &keyDerivationValues{
@@ -231,8 +231,8 @@ var _ = Describe("Client Crypto Setup", func() {
cs.negotiatedVersions = []protocol.VersionNumber{protocol.VersionWhatever}
cs.receivedSecurePacket = true
_, err := cs.handleSHLOMessage(map[Tag][]byte{
TagPUBS: []byte{0},
TagVER: []byte{0, 1},
TagPUBS: {0},
TagVER: {0, 1},
})
Expect(err).To(MatchError(qerr.Error(qerr.VersionNegotiationMismatch, "Downgrade attack detected")))
})

View File

@@ -17,7 +17,7 @@ func getDefaultServerConfigClient() map[Tag][]byte {
TagAEAD: []byte("AESG"),
TagPUBS: append([]byte{0x20, 0x00, 0x00}, bytes.Repeat([]byte{0}, 32)...),
TagOBIT: bytes.Repeat([]byte{0}, 8),
TagEXPY: []byte{0x0, 0x6c, 0x57, 0x78, 0, 0, 0, 0}, // 2033-12-24
TagEXPY: {0x0, 0x6c, 0x57, 0x78, 0, 0, 0, 0}, // 2033-12-24
}
}

View File

@@ -66,10 +66,10 @@ var _ = Describe("TLS Extension Handler, for the client", func() {
BeforeEach(func() {
fakeBody = &tlsExtensionBody{data: []byte("foobar foobar")}
parameters = map[transportParameterID][]byte{
initialMaxStreamDataParameterID: []byte{0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: []byte{0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: []byte{0x33, 0x44, 0x55, 0x66},
idleTimeoutParameterID: []byte{0x13, 0x37},
initialMaxStreamDataParameterID: {0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: {0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: {0x33, 0x44, 0x55, 0x66},
idleTimeoutParameterID: {0x13, 0x37},
statelessResetTokenParameterID: bytes.Repeat([]byte{0}, 16),
}
})

View File

@@ -77,10 +77,10 @@ var _ = Describe("TLS Extension Handler, for the server", func() {
BeforeEach(func() {
fakeBody = &tlsExtensionBody{data: []byte("foobar foobar")}
parameters = map[transportParameterID][]byte{
initialMaxStreamDataParameterID: []byte{0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: []byte{0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: []byte{0x33, 0x44, 0x55, 0x66},
idleTimeoutParameterID: []byte{0x13, 0x37},
initialMaxStreamDataParameterID: {0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: {0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: {0x33, 0x44, 0x55, 0x66},
idleTimeoutParameterID: {0x13, 0x37},
}
})

View File

@@ -115,11 +115,11 @@ var _ = Describe("Transport Parameters", func() {
BeforeEach(func() {
parameters = map[transportParameterID][]byte{
initialMaxStreamDataParameterID: []byte{0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: []byte{0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: []byte{0x33, 0x44, 0x55, 0x66},
initialMaxStreamIDUniParameterID: []byte{0x44, 0x55, 0x66, 0x77},
idleTimeoutParameterID: []byte{0x13, 0x37},
initialMaxStreamDataParameterID: {0x11, 0x22, 0x33, 0x44},
initialMaxDataParameterID: {0x22, 0x33, 0x44, 0x55},
initialMaxStreamIDBiDiParameterID: {0x33, 0x44, 0x55, 0x66},
initialMaxStreamIDUniParameterID: {0x44, 0x55, 0x66, 0x77},
idleTimeoutParameterID: {0x13, 0x37},
}
})
It("reads parameters", func() {