forked from quic-go/quic-go
use the new crypto/tls QUIC Transport (#3860)
This commit is contained in:
@@ -926,7 +926,7 @@ var _ = Describe("Server", func() {
|
||||
c, err := quic.DialAddr(context.Background(), ln.Addr().String(), &tls.Config{InsecureSkipVerify: true, NextProtos: []string{NextProtoH3}}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer c.CloseWithError(0, "")
|
||||
Expect(c.ConnectionState().TLS.ConnectionState.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
Expect(c.ConnectionState().TLS.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
})
|
||||
|
||||
It("sets the GetConfigForClient callback if no tls.Config is given", func() {
|
||||
@@ -954,7 +954,7 @@ var _ = Describe("Server", func() {
|
||||
c, err := quic.DialAddr(context.Background(), ln.Addr().String(), &tls.Config{InsecureSkipVerify: true, NextProtos: []string{NextProtoH3}}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer c.CloseWithError(0, "")
|
||||
Expect(c.ConnectionState().TLS.ConnectionState.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
Expect(c.ConnectionState().TLS.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
})
|
||||
|
||||
It("works if GetConfigForClient returns a nil tls.Config", func() {
|
||||
@@ -967,7 +967,7 @@ var _ = Describe("Server", func() {
|
||||
c, err := quic.DialAddr(context.Background(), ln.Addr().String(), &tls.Config{InsecureSkipVerify: true, NextProtos: []string{NextProtoH3}}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer c.CloseWithError(0, "")
|
||||
Expect(c.ConnectionState().TLS.ConnectionState.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
Expect(c.ConnectionState().TLS.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
})
|
||||
|
||||
It("sets the ALPN for tls.Configs returned by the tls.GetConfigForClient, if it returns a static tls.Config", func() {
|
||||
@@ -985,7 +985,7 @@ var _ = Describe("Server", func() {
|
||||
c, err := quic.DialAddr(context.Background(), ln.Addr().String(), &tls.Config{InsecureSkipVerify: true, NextProtos: []string{NextProtoH3}}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer c.CloseWithError(0, "")
|
||||
Expect(c.ConnectionState().TLS.ConnectionState.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
Expect(c.ConnectionState().TLS.NegotiatedProtocol).To(Equal(NextProtoH3))
|
||||
// check that the original config was not modified
|
||||
Expect(tlsClientConf.NextProtos).To(Equal([]string{"foo", "bar"}))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user