quic: use RFC9000 version (#376)

* #1682: RFC9000 as main QUIC version

* removed extra ALPN values from the TLSConfig

* updated to quic-go v0.21.0

* only use h3
This commit is contained in:
kelmenhorst 2021-06-14 16:59:24 +02:00 committed by GitHub
commit 10a2055163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 12 deletions

View file

@ -23,7 +23,7 @@ func (r MockableResolver) LookupHost(ctx context.Context, host string) ([]string
}
func TestDNSDialerSuccess(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
dialer := quicdialer.DNSDialer{
Resolver: new(net.Resolver), Dialer: quicdialer.SystemDialer{}}
sess, err := dialer.DialContext(
@ -38,7 +38,7 @@ func TestDNSDialerSuccess(t *testing.T) {
}
func TestDNSDialerNoPort(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
dialer := quicdialer.DNSDialer{
Resolver: new(net.Resolver), Dialer: quicdialer.SystemDialer{}}
sess, err := dialer.DialContext(
@ -69,7 +69,7 @@ func TestDNSDialerLookupHostAddress(t *testing.T) {
}
func TestDNSDialerLookupHostFailure(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
expected := errors.New("mocked error")
dialer := quicdialer.DNSDialer{Resolver: MockableResolver{
Err: expected,
@ -86,7 +86,7 @@ func TestDNSDialerLookupHostFailure(t *testing.T) {
}
func TestDNSDialerInvalidPort(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
dialer := quicdialer.DNSDialer{
Resolver: new(net.Resolver), Dialer: quicdialer.SystemDialer{}}
sess, err := dialer.DialContext(
@ -105,7 +105,7 @@ func TestDNSDialerInvalidPort(t *testing.T) {
}
func TestDNSDialerInvalidPortSyntax(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
dialer := quicdialer.DNSDialer{
Resolver: new(net.Resolver), Dialer: quicdialer.SystemDialer{}}
sess, err := dialer.DialContext(
@ -123,7 +123,7 @@ func TestDNSDialerInvalidPortSyntax(t *testing.T) {
}
func TestDNSDialerDialEarlyFails(t *testing.T) {
tlsConf := &tls.Config{NextProtos: []string{"h3-29"}}
tlsConf := &tls.Config{NextProtos: []string{"h3"}}
expected := errors.New("mocked DialEarly error")
dialer := quicdialer.DNSDialer{
Resolver: new(net.Resolver), Dialer: MockDialer{Err: expected}}

View file

@ -47,7 +47,7 @@ func errorWrapperCheckErr(t *testing.T, err error, op string) {
func TestErrorWrapperSuccess(t *testing.T) {
ctx := dialid.WithDialID(context.Background())
tlsConf := &tls.Config{
NextProtos: []string{"h3-29"},
NextProtos: []string{"h3"},
ServerName: "www.google.com",
}
d := quicdialer.ErrorWrapperDialer{Dialer: quicdialer.SystemDialer{}}

View file

@ -28,7 +28,7 @@ func (d MockDialer) DialContext(ctx context.Context, network, host string,
}
func TestHandshakeSaverSuccess(t *testing.T) {
nextprotos := []string{"h3-29"}
nextprotos := []string{"h3"}
servername := "www.google.com"
tlsConf := &tls.Config{
NextProtos: nextprotos,
@ -84,7 +84,7 @@ func TestHandshakeSaverSuccess(t *testing.T) {
}
func TestHandshakeSaverHostNameError(t *testing.T) {
nextprotos := []string{"h3-29"}
nextprotos := []string{"h3"}
servername := "wrong.host.badssl.com"
tlsConf := &tls.Config{
NextProtos: nextprotos,

View file

@ -13,7 +13,7 @@ import (
func TestSystemDialerInvalidIPFailure(t *testing.T) {
tlsConf := &tls.Config{
NextProtos: []string{"h3-29"},
NextProtos: []string{"h3"},
ServerName: "www.google.com",
}
saver := &trace.Saver{}
@ -35,7 +35,7 @@ func TestSystemDialerInvalidIPFailure(t *testing.T) {
func TestSystemDialerSuccessWithReadWrite(t *testing.T) {
// This is the most common use case for collecting reads, writes
tlsConf := &tls.Config{
NextProtos: []string{"h3-29"},
NextProtos: []string{"h3"},
ServerName: "www.google.com",
}
saver := &trace.Saver{}