set a net.Conn with the correct addresses on the tls.ClientHelloInfo (#4001)

This commit is contained in:
Marten Seemann 2023-07-31 16:32:10 -04:00 committed by GitHub
parent 44a58dc425
commit f3a0ce1599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import (
"crypto/x509"
"crypto/x509/pkix"
"math/big"
"net"
"time"
mocktls "github.com/quic-go/quic-go/internal/mocks/tls"
@ -65,6 +66,8 @@ var _ = Describe("Crypto Setup TLS", func() {
var token protocol.StatelessResetToken
server := NewCryptoSetupServer(
protocol.ConnectionID{},
&net.UDPAddr{IP: net.IPv6loopback, Port: 1234},
&net.UDPAddr{IP: net.IPv6loopback, Port: 4321},
&wire.TransportParameters{StatelessResetToken: &token},
testdata.GetTLSConfig(),
false,
@ -204,6 +207,8 @@ var _ = Describe("Crypto Setup TLS", func() {
}
server := NewCryptoSetupServer(
protocol.ConnectionID{},
&net.UDPAddr{IP: net.IPv6loopback, Port: 1234},
&net.UDPAddr{IP: net.IPv6loopback, Port: 4321},
serverTransportParameters,
serverConf,
enable0RTT,
@ -273,6 +278,8 @@ var _ = Describe("Crypto Setup TLS", func() {
}
server := NewCryptoSetupServer(
protocol.ConnectionID{},
&net.UDPAddr{IP: net.IPv6loopback, Port: 1234},
&net.UDPAddr{IP: net.IPv6loopback, Port: 4321},
sTransportParameters,
serverConf,
false,