func (ca *CAServer) matchWhitelist(dnsNames []string) error {
	if len(ca.domainsWhitelist) == 0 {
		return nil
	}
	var nomatch []string
	for _, name := range dnsNames {
		i := sort.SearchStrings(ca.domainsWhitelist, name)
		if i == len(ca.domainsWhitelist) || ca.domainsWhitelist[i] != name {
			nomatch = append(nomatch, name)
		}
	}
	if len(nomatch) > 0 {
		return fmt.Errorf("matchWhitelist: some domains don't match: %q", nomatch)
	}
	return nil
}
// matchWhitelist reports whether all dnsNames are whitelisted.
// The whitelist is provided in NewCAServer.
matchWhitelist reports whether all dnsNames are whitelisted.
The whitelist is provided in NewCAServer.
// matchWhitelist reports whether all dnsNames are whitelisted . // The whitelist is provided in NewCAServer .
func (ca *CAServer) matchWhitelist(dnsNames []string) error {
	if len(ca.domainsWhitelist) == 0 {
		return nil
	}
	var nomatch []string
	for _, name := range dnsNames {
		i := sort.SearchStrings(ca.domainsWhitelist, name)
		if i == len(ca.domainsWhitelist) || ca.domainsWhitelist[i] != name {
			nomatch = append(nomatch, name)
		}
	}
	if len(nomatch) > 0 {
		return fmt.Errorf("matchWhitelist: some domains don't match: %q", nomatch)
	}
	return nil
}
func ( ca * CAServer ) matchWhitelist ( dnsNames [ ] string ) error { if len ( ca . domainsWhitelist ) == 0 { return nil } var nomatch [ ] string for _ , name := range dnsNames { i := sort . SearchStrings ( ca . domainsWhitelist , name ) if i == len ( ca . domainsWhitelist ) || ca . domainsWhitelist [ i ] != name { nomatch = append ( nomatch , name ) } } if len ( nomatch ) > 0 { return fmt . Errorf ( " " , nomatch ) } return nil }
matchWhitelist reports whether all dnsNames are whitelisted.
matchWhitelist reports whether all dnsNames are whitelisted .