Skip to content

Commit

Permalink
transport: include InsecureSkipVerify in TLSInfo
Browse files Browse the repository at this point in the history
Some functions take a TLSInfo to generate a tls.Config and there was no
way to force the InsecureSkipVerify flag.
  • Loading branch information
heyitsanthony committed Jul 18, 2017
1 parent 9ca8572 commit caae11e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/transport/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ func wrapTLS(addr, scheme string, tlsinfo *TLSInfo, l net.Listener) (net.Listene
}

type TLSInfo struct {
CertFile string
KeyFile string
CAFile string
TrustedCAFile string
ClientCertAuth bool
CRLFile string
CertFile string
KeyFile string
CAFile string
TrustedCAFile string
ClientCertAuth bool
CRLFile string
InsecureSkipVerify bool

// ServerName ensures the cert matches the given host in case of discovery / virtual hosting
ServerName string
Expand Down Expand Up @@ -236,6 +237,7 @@ func (info TLSInfo) ClientConfig() (*tls.Config, error) {
} else {
cfg = &tls.Config{ServerName: info.ServerName}
}
cfg.InsecureSkipVerify = info.InsecureSkipVerify

CAFiles := info.cafiles()
if len(CAFiles) > 0 {
Expand Down

0 comments on commit caae11e

Please sign in to comment.