Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

TLS support #30

Closed
jimpo opened this issue Apr 6, 2017 · 1 comment
Closed

TLS support #30

jimpo opened this issue Apr 6, 2017 · 1 comment

Comments

@jimpo
Copy link

jimpo commented Apr 6, 2017

What is the best interface for TLS-enabled variants of manet.Dial and manet.Listen? In the Go stdlib, the crypto/tls package implements functions:

func Dial(network, addr string, config *Config) (*Conn, error)
func Listen(network, laddr string, config *Config) (net.Listener, error)

The net/http package sets the precedent of appending "TLS" to the end of TLS-enabled function names with http.ListenAndServeTLS.

How do you feel about adding to go-multiaddr-net the following functions?

func DialTLS(remote ma.Multiaddr, config *tls.Config) (*Conn, error)
func ListenTLS(laddr ma.Multiaddr, config *tls.Config) (Listener, error)

Another option would be to include the TLS information in the multiaddr struct, which I posted about here: multiformats/multiaddr#47.

@Stebalien
Copy link
Member

I'd rather not make this package depend on TLS, go is really bad about trimming deps it doesn't need. Maybe this deserves a new go-multiaddr-tls package (if someone really needs it)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants