]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: document VerifyPeerCertificate behavior in relation to ClientAuth
authorFilippo Valsorda <hi@filippo.io>
Sat, 16 Dec 2017 13:35:52 +0000 (09:35 -0400)
committerAdam Langley <agl@golang.org>
Sun, 31 Dec 2017 22:37:29 +0000 (22:37 +0000)
Change-Id: I3ff478912a5a178492d544d2f4ee9cc7570d9acc
Reviewed-on: https://go-review.googlesource.com/84475
Reviewed-by: Filippo Valsorda <hi@filippo.io>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/tls/common.go

index d4b0286b85392946c8641c18cf355a94b14545e3..646b107958ac4c7fdf83199f7bef8eecf1db1ef5 100644 (file)
@@ -406,8 +406,9 @@ type Config struct {
        //
        // If normal verification fails then the handshake will abort before
        // considering this callback. If normal verification is disabled by
-       // setting InsecureSkipVerify then this callback will be considered but
-       // the verifiedChains argument will always be nil.
+       // setting InsecureSkipVerify, or (for a server) when ClientAuth is
+       // RequestClientCert or RequireAnyClientCert, then this callback will
+       // be considered but the verifiedChains argument will always be nil.
        VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
 
        // RootCAs defines the set of root certificate authorities