code: func (c *Config) BuildNameToCertificate() {
  	c.NameToCertificate = make(map[string]*Certificate)
  	for i := range c.Certificates {
  		cert := &c.Certificates[i]
  		x509Cert, err := x509.ParseCertificate(cert.Certificate[0])
  		if err != nil {
  			continue
  		}
  		if len(x509Cert.Subject.CommonName) > 0 {
  			c.NameToCertificate[x509Cert.Subject.CommonName] = cert
  		}
  		for _, san := range x509Cert.DNSNames {
  			c.NameToCertificate[san] = cert
  		}
  	}
  }
docs: // BuildNameToCertificate parses c.Certificates and builds c.NameToCertificate
  // from the CommonName and SubjectAlternateName fields of each of the leaf
  // certificates.