diff --git a/src/crypto/tls/tls.go b/src/crypto/tls/tls.go index 1520c30fca..6fdedc39fc 100644 --- a/src/crypto/tls/tls.go +++ b/src/crypto/tls/tls.go @@ -101,7 +101,13 @@ type Dialer struct { // // The returned Conn, if any, will always be of type *Conn. func (d *Dialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { - return nil, errors.New("tls:DialContext not implemented") + switch network { + case "tcp", "tcp4": + default: + return nil, fmt.Errorf("Network %s not supported", network) + } + + return net.DialTLS(addr) } // LoadX509KeyPair reads and parses a public/private key pair from a pair