MCPcopy
hub / github.com/caddyserver/caddy / Active

Method Active

modules/caddytls/connpolicy.go:824–831  ·  view source on GitHub ↗

Active returns true if clientauth has an actionable configuration.

()

Source from the content-addressed store, hash-verified

822
823// Active returns true if clientauth has an actionable configuration.
824func (clientauth ClientAuthentication) Active() bool {
825 return len(clientauth.TrustedCACerts) > 0 ||
826 len(clientauth.TrustedCACertPEMFiles) > 0 ||
827 len(clientauth.TrustedLeafCerts) > 0 || // TODO: DEPRECATED
828 len(clientauth.VerifiersRaw) > 0 ||
829 len(clientauth.Mode) > 0 ||
830 clientauth.CARaw != nil || clientauth.ca != nil
831}
832
833// ConfigureTLSConfig sets up cfg to enforce clientauth's configuration.
834func (clientauth *ClientAuthentication) ConfigureTLSConfig(cfg *tls.Config) error {

Callers 2

ConfigureTLSConfigMethod · 0.95
hasTLSClientAuthMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected