Home | History | Annotate | Download | only in ssl

Lines Matching defs:cn

48  * The hostname must match either the first CN, or any of the subject-alts.
49 * A wildcard can occur in the CN, and in any of the subject-alts.
114 // first CN provided. All other CNs are ignored.
129 String msg = "Certificate for <" + host + "> doesn't contain CN or DNS subjectAlt";
141 // Don't trim the CN, though!
142 String cn = it.next();
143 cn = cn.toLowerCase(Locale.ENGLISH);
144 // Store CN in StringBuilder in case we need to report an error.
146 buf.append(cn);
152 // The CN better have at least two dots if it wants wildcard
155 boolean doWildcard = cn.startsWith("*.") &&
156 cn.lastIndexOf('.') >= 0 &&
157 acceptableCountryWildcard(cn) &&
161 match = hostName.endsWith(cn.substring(1));
165 match = countDots(hostName) == countDots(cn);
168 match = hostName.equals(cn);
223 public static boolean acceptableCountryWildcard(String cn) {
224 int cnLen = cn.length();
227 if (cn.charAt(cnLen - 3) == '.') {
229 String s = cn.substring(2, cnLen - 3);
266 int x = tok.indexOf("CN=");
287 * from the CN field.
341 * or "DNS" Subject-Alts. Most implementations only look at the first CN,
346 * @param cns CN fields, in order, as extracted from the X.509