drop support for QUIC 35

This commit is contained in:
Marten Seemann 2017-09-09 12:43:34 +03:00
parent ecd519240e
commit 8dbd60a095
7 changed files with 10 additions and 26 deletions

View file

@ -2,7 +2,7 @@
## v0.6.0 (unreleased)
- Add support for QUIC 38 and 39
- Add support for QUIC 38 and 39, drop support for QUIC 35
- Added `quic.Config` options for maximal flow control windows
- Add a `quic.Config` option for QUIC versions
- Add a `quic.Config` option to request truncation of the connection ID from a server

View file

@ -199,9 +199,9 @@ var _ = Describe("Client Crypto Setup", func() {
})
It("detects a downgrade attack", func() {
cs.negotiatedVersions = []protocol.VersionNumber{protocol.Version36}
cs.negotiatedVersions = []protocol.VersionNumber{12}
b := &bytes.Buffer{}
utils.LittleEndian.WriteUint32(b, protocol.VersionNumberToTag(protocol.Version35))
utils.LittleEndian.WriteUint32(b, protocol.VersionNumberToTag(11))
Expect(cs.validateVersionList(b.Bytes())).To(BeFalse())
})

View file

@ -224,7 +224,6 @@ var _ = Describe("Server Crypto Setup", func() {
Context("diversification nonce", func() {
BeforeEach(func() {
cs.version = protocol.Version35
cs.secureAEAD = &mockAEAD{}
cs.receivedForwardSecurePacket = false

View file

@ -5,8 +5,7 @@ type VersionNumber int
// The version numbers, making grepping easier
const (
Version35 VersionNumber = 35 + iota
Version36
Version36 VersionNumber = 36 + iota
Version37
Version38
Version39
@ -23,7 +22,6 @@ var SupportedVersions = []VersionNumber{
Version38,
Version37,
Version36,
Version35,
}
// UsesTLS says if this QUIC version uses TLS 1.3 for the handshake

View file

@ -7,7 +7,6 @@ import (
var _ = Describe("Version", func() {
It("says if a version supports TLS", func() {
Expect(Version35.UsesTLS()).To(BeFalse())
Expect(Version36.UsesTLS()).To(BeFalse())
Expect(Version37.UsesTLS()).To(BeFalse())
Expect(Version38.UsesTLS()).To(BeFalse())

View file

@ -276,7 +276,7 @@ var _ = Describe("Public Header", func() {
PacketNumber: 2,
PacketNumberLen: protocol.PacketNumberLen6,
}
err := hdr.Write(b, protocol.Version35, protocol.PerspectiveServer)
err := hdr.Write(b, versionLittleEndian, protocol.PerspectiveServer)
Expect(err).ToNot(HaveOccurred())
Expect(b.Bytes()).To(Equal([]byte{0x38, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0}))
})
@ -288,7 +288,7 @@ var _ = Describe("Public Header", func() {
PacketNumber: 0x1337,
PacketNumberLen: protocol.PacketNumberLen6,
}
err := hdr.Write(b, protocol.Version35, protocol.PerspectiveClient)
err := hdr.Write(b, versionLittleEndian, protocol.PerspectiveClient)
Expect(err).ToNot(HaveOccurred())
Expect(b.Bytes()).To(Equal([]byte{0x38, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 0x37, 0x13, 0, 0, 0, 0}))
})
@ -316,18 +316,6 @@ var _ = Describe("Public Header", func() {
Expect(b.Bytes()).To(Equal([]byte{0x30, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}))
})
It("writes proper v33 packets", func() {
b := &bytes.Buffer{}
hdr := PublicHeader{
ConnectionID: 0x4cfa9f9b668619f6,
PacketNumber: 1,
PacketNumberLen: protocol.PacketNumberLen1,
}
err := hdr.Write(b, protocol.Version35, protocol.PerspectiveServer)
Expect(err).ToNot(HaveOccurred())
Expect(b.Bytes()).To(Equal([]byte{0x08, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 0x01}))
})
It("writes diversification nonces", func() {
b := &bytes.Buffer{}
hdr := PublicHeader{
@ -336,7 +324,7 @@ var _ = Describe("Public Header", func() {
PacketNumberLen: protocol.PacketNumberLen1,
DiversificationNonce: bytes.Repeat([]byte{1}, 32),
}
err := hdr.Write(b, protocol.Version35, protocol.PerspectiveServer)
err := hdr.Write(b, versionLittleEndian, protocol.PerspectiveServer)
Expect(err).ToNot(HaveOccurred())
Expect(b.Bytes()).To(Equal([]byte{
0x0c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c,

View file

@ -182,7 +182,7 @@ var _ = Describe("Session", func() {
var pSess Session
pSess, handshakeChan, err = newSession(
mconn,
protocol.Version35,
protocol.Version37,
0,
scfg,
nil,
@ -234,7 +234,7 @@ var _ = Describe("Session", func() {
}
pSess, _, err := newSession(
mconn,
protocol.Version35,
protocol.Version37,
0,
scfg,
nil,
@ -1706,7 +1706,7 @@ var _ = Describe("Client Session", func() {
sessP, _, err := newClientSession(
mconn,
"hostname",
protocol.Version35,
protocol.Version37,
0,
nil,
populateClientConfig(&Config{}),