Unverified Commit aa803f3d authored by Marten Seemann's avatar Marten Seemann
Browse files

initialize the listener with a valid TLS config

The certificate doesn’t matter, since it is not validated anywehere
(yet), but we need to send something.
parent 9bf002cd
package libp2pquic
import (
"crypto/tls"
"net"
pstore "github.com/libp2p/go-libp2p-peerstore"
tpt "github.com/libp2p/go-libp2p-transport"
testdata "github.com/lucas-clemente/quic-go/testdata"
quicconn "github.com/marten-seemann/quic-conn"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net"
......@@ -19,7 +19,9 @@ type listener struct {
}
func newListener(laddr ma.Multiaddr, peers pstore.Peerstore, transport tpt.Transport) (*listener, error) {
tlsConf := &tls.Config{}
// we need to provide a certificate here
// use the demo certificate from quic-go
tlsConf := testdata.GetTLSConfig()
network, host, err := manet.DialArgs(laddr)
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