Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 08:15 UTC
doc: remove docs of deprecated directives (#6566)
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Mohammed Al Sahaf committed
Sep 29, 2024 at 12:12 UTC
1a345b4fa620dfb0909a3b086bd76e35dfdbefa5
1 file changed
+2
-8
modules/caddytls/connpolicy.go
+2
-8
@@ -555,16 +555,10 @@ type ClientAuthentication struct {
555
// trust_pool <module> {
556
// ...
557
// }
558
-// trusted_leaf_cert <base64_der>
559
-// trusted_leaf_cert_file <filename>
558
// verifier <module>
559
// }
560
//
563
-// If `mode` is not provided, it defaults to `require_and_verify` if any of the following are provided:
564
-// - `trusted_leaf_certs`
565
-// - `trusted_leaf_cert_file`
566
-// - `trust_pool`
567
-//
561
+// If `mode` is not provided, it defaults to `require_and_verify` if `trust_pool` is provided.
562
// Otherwise, it defaults to `require`.
563
func (ca *ClientAuthentication) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
564
for d.NextArg() {
@@ -768,7 +762,7 @@ func (clientauth *ClientAuthentication) ConfigureTLSConfig(cfg *tls.Config) erro
762
if len(clientauth.TrustedCACerts) > 0 ||
763
len(clientauth.TrustedCACertPEMFiles) > 0 ||
764
len(clientauth.TrustedLeafCerts) > 0 ||
771
- clientauth.CARaw != nil {
765
+ clientauth.CARaw != nil || clientauth.ca != nil {
766
cfg.ClientAuth = tls.RequireAndVerifyClientCert
767
} else {
768
cfg.ClientAuth = tls.RequireAnyClientCert