"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java" between
httpcomponents-client-4.5.5-src.tar.gz and httpcomponents-client-4.5.6-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. (Web) Server ("httpd").

DefaultHostnameVerifier.java  (httpcomponents-client-4.5.5-src):DefaultHostnameVerifier.java  (httpcomponents-client-4.5.6-src)
skipping to change at line 308 skipping to change at line 308
static List<SubjectName> getSubjectAltNames(final X509Certificate cert) { static List<SubjectName> getSubjectAltNames(final X509Certificate cert) {
try { try {
final Collection<List<?>> entries = cert.getSubjectAlternativeNames( ); final Collection<List<?>> entries = cert.getSubjectAlternativeNames( );
if (entries == null) { if (entries == null) {
return Collections.emptyList(); return Collections.emptyList();
} }
final List<SubjectName> result = new ArrayList<SubjectName>(); final List<SubjectName> result = new ArrayList<SubjectName>();
for (final List<?> entry : entries) { for (final List<?> entry : entries) {
final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null; final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null;
if (type != null) { if (type != null) {
final Object o = entry.get(1); if (type == SubjectName.DNS || type == SubjectName.IP) {
if (o instanceof String) { final Object o = entry.get(1);
result.add(new SubjectName((String) o, type.intValue())) if (o instanceof String) {
; result.add(new SubjectName((String) o, type));
} else if (o instanceof byte[]) { } else if (o instanceof byte[]) {
// TODO ASN.1 DER encoded form // TODO ASN.1 DER encoded form
}
} }
} }
} }
return result; return result;
} catch (final CertificateParsingException ignore) { } catch (final CertificateParsingException ignore) {
return Collections.emptyList(); return Collections.emptyList();
} }
} }
/* /*
 End of changes. 1 change blocks. 
6 lines changed or deleted 7 lines changed or added

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