"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

AbstractVerifier.java  (httpcomponents-client-4.5.6-src):AbstractVerifier.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 217 skipping to change at line 217
final String firstpart = parts[0]; final String firstpart = parts[0];
if (firstpart.length() > 1) { // e.g. server* if (firstpart.length() > 1) { // e.g. server*
final String prefix = firstpart.substring(0, firstpart.length() - 1); // e.g. server final String prefix = firstpart.substring(0, firstpart.length() - 1); // e.g. server
final String suffix = normalizedIdentity.substring(firstpart.len gth()); // skip wildcard part from cn final String suffix = normalizedIdentity.substring(firstpart.len gth()); // skip wildcard part from cn
final String hostSuffix = normalizedHost.substring(prefix.length ()); // skip wildcard part from normalizedHost final String hostSuffix = normalizedHost.substring(prefix.length ()); // skip wildcard part from normalizedHost
match = normalizedHost.startsWith(prefix) && hostSuffix.endsWith (suffix); match = normalizedHost.startsWith(prefix) && hostSuffix.endsWith (suffix);
} else { } else {
match = normalizedHost.endsWith(normalizedIdentity.substring(1)) ; match = normalizedHost.endsWith(normalizedIdentity.substring(1)) ;
} }
return match && (!strict || countDots(normalizedHost) == countDots(n ormalizedIdentity)); return match && (!strict || countDots(normalizedHost) == countDots(n ormalizedIdentity));
} else {
return normalizedHost.equals(normalizedIdentity);
} }
return normalizedHost.equals(normalizedIdentity);
} }
private static boolean validCountryWildcard(final String parts[]) { private static boolean validCountryWildcard(final String parts[]) {
if (parts.length != 3 || parts[2].length() != 2) { if (parts.length != 3 || parts[2].length() != 2) {
return true; // it's not an attempt to wildcard a 2TLD within a coun try code return true; // it's not an attempt to wildcard a 2TLD within a coun try code
} }
return Arrays.binarySearch(BAD_COUNTRY_2LDS, parts[1]) < 0; return Arrays.binarySearch(BAD_COUNTRY_2LDS, parts[1]) < 0;
} }
public static boolean acceptableCountryWildcard(final String cn) { public static boolean acceptableCountryWildcard(final String cn) {
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)