Commit b74c4143 authored by Marten Seemann's avatar Marten Seemann
Browse files

privatize generating the tls.Config

parent 330efe75
......@@ -18,8 +18,7 @@ import (
// mint certificate selection is broken.
const hostname = "quic.ipfs"
// TODO: make this private
func GenerateConfig(privKey ic.PrivKey) (*tls.Config, error) {
func generateConfig(privKey ic.PrivKey) (*tls.Config, error) {
key, hostCert, err := keyToCertificate(privKey)
if err != nil {
return nil, err
......
......@@ -32,7 +32,7 @@ func newListener(addr ma.Multiaddr, transport tpt.Transport, localPeer peer.ID,
if err != nil {
return nil, err
}
tlsConf, err := GenerateConfig(key)
tlsConf, err := generateConfig(key)
if err != nil {
return nil, err
}
......
......@@ -42,7 +42,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
if err != nil {
return nil, err
}
tlsConf, err := GenerateConfig(t.privKey)
tlsConf, err := generateConfig(t.privKey)
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