Active returns true if clientauth has an actionable configuration.
()
| 822 | |
| 823 | // Active returns true if clientauth has an actionable configuration. |
| 824 | func (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. |
| 834 | func (clientauth *ClientAuthentication) ConfigureTLSConfig(cfg *tls.Config) error { |
no outgoing calls
no test coverage detected