Skip to content

Commit

Permalink
Merge pull request #38 from projectdiscovery/maint-tls
Browse files Browse the repository at this point in the history
Adding Client TLS1.0
  • Loading branch information
Mzack9999 committed Jun 9, 2022
2 parents 7b8c9c7 + 7d34c30 commit 2ff59f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fastdialer/dialer.go
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"log"
"net"
"strings"

Expand Down Expand Up @@ -104,10 +105,10 @@ func (d *Dialer) Dial(ctx context.Context, network, address string) (conn net.Co
// DialTLS with encrypted connection
func (d *Dialer) DialTLS(ctx context.Context, network, address string) (conn net.Conn, err error) {
if d.options.WithZTLS {
return d.DialZTLSWithConfig(ctx, network, address, &ztls.Config{InsecureSkipVerify: true})
return d.DialZTLSWithConfig(ctx, network, address, &ztls.Config{InsecureSkipVerify: true, MinVersion: tls.VersionTLS10})
}

return d.DialTLSWithConfig(ctx, network, address, &tls.Config{InsecureSkipVerify: true})
return d.DialTLSWithConfig(ctx, network, address, &tls.Config{InsecureSkipVerify: true, MinVersion: tls.VersionTLS10})
}

// DialZTLS with encrypted connection using ztls
Expand Down Expand Up @@ -202,7 +203,9 @@ func (d *Dialer) dial(ctx context.Context, network, address string, shouldUseTLS
}
hostPort := net.JoinHostPort(ip, port)
if shouldUseTLS {
log.Println(tlsconfig.MinVersion)
tlsconfigCopy := tlsconfig.Clone()
log.Println(tlsconfigCopy.MinVersion)
switch {
case d.options.SNIName != "":
tlsconfigCopy.ServerName = d.options.SNIName
Expand Down

0 comments on commit 2ff59f4

Please sign in to comment.