code: func GetAndValidateCertificateSubject(certs []tls.Certificate) (pkix.Name, error) {
  	for i := range certs {
  		cert := &certs[i]
  		x509Cert, err := x509.ParseCertificate(cert.Certificate[0])
  		if err != nil {
  			continue
  		}
  		if len(x509Cert.Subject.OrganizationalUnit) < 1 {
  			return pkix.Name{}, errors.New("no OU found in certificate subject")
  		}
  
  		if len(x509Cert.Subject.Organization) < 1 {
  			return pkix.Name{}, errors.New("no organization found in certificate subject")
  		}
  		if x509Cert.Subject.CommonName == "" {
  			return pkix.Name{}, errors.New("no valid subject names found for TLS configuration")
  		}
  
  		return x509Cert.Subject, nil
  	}
  
  	return pkix.Name{}, errors.New("no valid certificates found for TLS configuration")
  }
docs: // GetAndValidateCertificateSubject is a helper method to retrieve and validate the subject
  // from the x509 certificate underlying a tls.Certificate