protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition (#3764)

This commit is contained in:
Marten Seemann 2023-04-19 16:24:34 +02:00 committed by GitHub
parent a753cb13d8
commit 1f57d4e789
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 68 additions and 77 deletions

View file

@ -79,10 +79,10 @@ var _ = Describe("Connection ID lengths tests", func() {
It("downloads a file using a 0-byte connection ID for the client", func() {
serverConf := getQuicConfig(&quic.Config{
ConnectionIDLength: randomConnIDLen(),
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
})
clientConf := getQuicConfig(&quic.Config{
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
})
ln := runServer(serverConf)
@ -93,11 +93,11 @@ var _ = Describe("Connection ID lengths tests", func() {
It("downloads a file when both client and server use a random connection ID length", func() {
serverConf := getQuicConfig(&quic.Config{
ConnectionIDLength: randomConnIDLen(),
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
})
clientConf := getQuicConfig(&quic.Config{
ConnectionIDLength: randomConnIDLen(),
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
})
ln := runServer(serverConf)
@ -107,11 +107,11 @@ var _ = Describe("Connection ID lengths tests", func() {
It("downloads a file when both client and server use a custom connection ID generator", func() {
serverConf := getQuicConfig(&quic.Config{
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
ConnectionIDGenerator: &connIDGenerator{length: randomConnIDLen()},
})
clientConf := getQuicConfig(&quic.Config{
Versions: []protocol.VersionNumber{protocol.VersionTLS},
Versions: []protocol.VersionNumber{protocol.Version1},
ConnectionIDGenerator: &connIDGenerator{length: randomConnIDLen()},
})

View file

@ -76,8 +76,8 @@ var _ = Describe("Handshake RTT tests", func() {
var clientConfig *quic.Config
BeforeEach(func() {
serverConfig.Versions = []protocol.VersionNumber{protocol.VersionTLS}
clientConfig = getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{protocol.VersionTLS}})
serverConfig.Versions = []protocol.VersionNumber{protocol.Version1}
clientConfig = getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{protocol.Version1}})
clientConfig := getTLSClientConfig()
clientConfig.InsecureSkipVerify = true
})

View file

@ -23,7 +23,7 @@ var _ = Describe("Bidirectional streams", func() {
qconf *quic.Config
)
for _, v := range []protocol.VersionNumber{protocol.VersionTLS} {
for _, v := range []protocol.VersionNumber{protocol.Version1} {
version := v
Context(fmt.Sprintf("with QUIC %s", version), func() {

View file

@ -25,7 +25,7 @@ var _ = Describe("Unidirectional Streams", func() {
BeforeEach(func() {
var err error
qconf = &quic.Config{Versions: []protocol.VersionNumber{protocol.VersionTLS}}
qconf = &quic.Config{Versions: []protocol.VersionNumber{protocol.Version1}}
server, err = quic.ListenAddr("localhost:0", getTLSConfig(), getQuicConfig(qconf))
Expect(err).ToNot(HaveOccurred())
serverAddr = fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port)

View file

@ -31,7 +31,7 @@ var _ = Describe("QUIC Proxy", func() {
hdr := wire.ExtendedHeader{
Header: wire.Header{
Type: protocol.PacketTypeInitial,
Version: protocol.VersionTLS,
Version: protocol.Version1,
Length: 4 + protocol.ByteCount(len(payload)),
DestConnectionID: protocol.ParseConnectionID([]byte{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37}),
SrcConnectionID: protocol.ParseConnectionID([]byte{0xde, 0xad, 0xbe, 0xef, 0, 0, 0x13, 0x37}),
@ -49,7 +49,7 @@ var _ = Describe("QUIC Proxy", func() {
hdr, data, _, err := wire.ParsePacket(b)
ExpectWithOffset(1, err).ToNot(HaveOccurred())
Expect(hdr.Type).To(Equal(protocol.PacketTypeInitial))
extHdr, err := hdr.ParseExtended(bytes.NewReader(data), protocol.VersionTLS)
extHdr, err := hdr.ParseExtended(bytes.NewReader(data), protocol.Version1)
ExpectWithOffset(1, err).ToNot(HaveOccurred())
return extHdr.PacketNumber
}