Skip to content

Commit cd10f5f

Browse files
committed
crypto/tls: relax the docs of InsecureSkipVerify
Fixes #39074 Change-Id: I72ec95f4b190253bb82d52a03a769b0399170b93 Reviewed-on: https://go-review.googlesource.com/c/go/+/239746 Reviewed-by: Katie Hockman <[email protected]>
1 parent c769a47 commit cd10f5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/crypto/tls/common.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,12 @@ type Config struct {
600600
// by the policy in ClientAuth.
601601
ClientCAs *x509.CertPool
602602

603-
// InsecureSkipVerify controls whether a client verifies the
604-
// server's certificate chain and host name.
605-
// If InsecureSkipVerify is true, TLS accepts any certificate
606-
// presented by the server and any host name in that certificate.
607-
// In this mode, TLS is susceptible to machine-in-the-middle attacks.
608-
// This should be used only for testing.
603+
// InsecureSkipVerify controls whether a client verifies the server's
604+
// certificate chain and host name. If InsecureSkipVerify is true, crypto/tls
605+
// accepts any certificate presented by the server and any host name in that
606+
// certificate. In this mode, TLS is susceptible to machine-in-the-middle
607+
// attacks unless custom verification is used. This should be used only for
608+
// testing or in combination with VerifyConnection or VerifyPeerCertificate.
609609
InsecureSkipVerify bool
610610

611611
// CipherSuites is a list of supported cipher suites for TLS versions up to

0 commit comments

Comments
 (0)