diff options
Diffstat (limited to 'modules/caddytls/tls.go')
-rw-r--r-- | modules/caddytls/tls.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go index 63bc21d..7f5b1e9 100644 --- a/modules/caddytls/tls.go +++ b/modules/caddytls/tls.go @@ -98,7 +98,7 @@ func (t *TLS) Start() error { Storage: t.ctx.Storage(), }) for _, cert := range certs { - err := magic.CacheUnmanagedTLSCertificate(cert) + err := magic.CacheUnmanagedTLSCertificate(cert.Certificate, cert.Tags) if err != nil { return fmt.Errorf("caching unmanaged certificate: %v", err) } @@ -182,8 +182,16 @@ func (t *TLS) getAutomationPolicyForName(name string) AutomationPolicy { } // CertificateLoader is a type that can load certificates. +// Certificates can optionally be associated with tags. type CertificateLoader interface { - LoadCertificates() ([]tls.Certificate, error) + LoadCertificates() ([]Certificate, error) +} + +// Certificate is a TLS certificate, optionally +// associated with arbitrary tags. +type Certificate struct { + tls.Certificate + Tags []string } // AutomationConfig designates configuration for the |