diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-02-02 01:33:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 23:33:36 -0700 |
commit | 7557d1d92240d7dc36a6f8137ab542f3908f316c (patch) | |
tree | 43b8aba4311e895c5a42ae41bcfea38d80563252 /modules | |
parent | ff74a0aa09a24afd63686c2d79cb605ecbb47b8c (diff) |
reverseproxy: Avoid returning a `nil` error during GetClientCertificate (#4550)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/reverseproxy/httptransport.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/reverseproxy/httptransport.go b/modules/caddyhttp/reverseproxy/httptransport.go index f23504c..4be51af 100644 --- a/modules/caddyhttp/reverseproxy/httptransport.go +++ b/modules/caddyhttp/reverseproxy/httptransport.go @@ -364,6 +364,9 @@ func (t TLSConfig) MakeTLSClientConfig(ctx caddy.Context) (*tls.Config, error) { return &cert.Certificate, nil } } + if err == nil { + err = fmt.Errorf("no client certificate found for automate name: %s", t.ClientCertificateAutomate) + } return nil, err } } |