certauth.go
func (a *Auth) ValidateOU(verifiedCert *x509.Certificate) error {
	var failed []string

	for _, ou := range a.opt.AllowedOUs {
		for _, clientOU := range verifiedCert.Subject.OrganizationalUnit {
			if ou == clientOU {
				return nil
			}
			failed = append(failed, clientOU)
		}
	}
	return fmt.Errorf("cert failed OU validation for %v, Allowed: %v", failed, a.opt.AllowedOUs)
}
func (a *Auth) ValidateOU(verifiedCert *x509.Certificate) error {
	var failed []string

	for _, ou := range a.opt.AllowedOUs {
		for _, clientOU := range verifiedCert.Subject.OrganizationalUnit {
			if ou == clientOU {
				return nil
			}
			failed = append(failed, clientOU)
		}
	}
	return fmt.Errorf("cert failed OU validation for %v, Allowed: %v", failed, a.opt.AllowedOUs)
}
// ValidateOU checks the OU of a verified peer cert and raises 403 if the OU doesn't match any OU in the AllowedOUs list.