Commit 01b7ad90 authored by Marten Seemann's avatar Marten Seemann
Browse files

use the new quic-go API

The tls.Config was removed from the quic.Config in
https://github.com/lucas-clemente/quic-go/pull/713.
parent 5ba748bd
......@@ -25,13 +25,12 @@ func newDialer(transport tpt.Transport) (*dialer, error) {
func (d *dialer) Dial(raddr ma.Multiaddr) (tpt.Conn, error) {
// TODO: check that raddr is a QUIC address
tlsConf := &tls.Config{InsecureSkipVerify: true}
_, host, err := manet.DialArgs(raddr)
if err != nil {
return nil, err
}
qsess, err := quic.DialAddr(host, &quic.Config{TLSConfig: tlsConf})
qsess, err := quic.DialAddr(host, &tls.Config{InsecureSkipVerify: true}, nil)
if err != nil {
return nil, err
}
......
......@@ -20,17 +20,13 @@ type listener struct {
var _ tpt.Listener = &listener{}
func newListener(laddr ma.Multiaddr, t tpt.Transport) (*listener, error) {
qconf := &quic.Config{
// we need to provide a certificate here
// use the demo certificate from quic-go
TLSConfig: testdata.GetTLSConfig(),
}
_, host, err := manet.DialArgs(laddr)
if err != nil {
return nil, err
}
qln, err := quic.ListenAddr(host, qconf)
// we need to provide a certificate here
// use the demo certificate from quic-go
qln, err := quic.ListenAddr(host, testdata.GetTLSConfig(), nil)
if err != nil {
return nil, err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment