// BuildNamedCertificates returns a map of *tls.Certificate by name. It's // suitable for use in tls.Config#NamedCertificates. Returns an error if any of the certs // is invalid. Returns nil if len(certs) == 0 func (c *DynamicServingCertificateController) BuildNamedCertificates(sniCerts []sniCertKeyContent) (map[string]*tls.Certificate, error) { … } // getCertificateNames returns names for an x509.Certificate. The names are // suitable for use in tls.Config#NamedCertificates. func getCertificateNames(cert *x509.Certificate) []string { … }