From 1a345b4fa620dfb0909a3b086bd76e35dfdbefa5 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sun, 29 Sep 2024 12:12:52 +0300 Subject: [PATCH] doc: remove docs of deprecated directives (#6566) Co-authored-by: Francis Lavoie --- modules/caddytls/connpolicy.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index 2ff41f7b..2e2d4f74 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -555,16 +555,10 @@ type ClientAuthentication struct { // trust_pool { // ... // } -// trusted_leaf_cert -// trusted_leaf_cert_file // verifier // } // -// If `mode` is not provided, it defaults to `require_and_verify` if any of the following are provided: -// - `trusted_leaf_certs` -// - `trusted_leaf_cert_file` -// - `trust_pool` -// +// If `mode` is not provided, it defaults to `require_and_verify` if `trust_pool` is provided. // Otherwise, it defaults to `require`. func (ca *ClientAuthentication) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { for d.NextArg() { @@ -768,7 +762,7 @@ func (clientauth *ClientAuthentication) ConfigureTLSConfig(cfg *tls.Config) erro if len(clientauth.TrustedCACerts) > 0 || len(clientauth.TrustedCACertPEMFiles) > 0 || len(clientauth.TrustedLeafCerts) > 0 || - clientauth.CARaw != nil { + clientauth.CARaw != nil || clientauth.ca != nil { cfg.ClientAuth = tls.RequireAndVerifyClientCert } else { cfg.ClientAuth = tls.RequireAnyClientCert