"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java" between
httpcomponents-client-4.5.9-src.tar.gz and httpcomponents-client-4.5.10-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.

TestDefaultHostnameVerifier.java  (httpcomponents-client-4.5.9-src):TestDefaultHostnameVerifier.java  (httpcomponents-client-4.5.10-src)
skipping to change at line 278 skipping to change at line 278
Assert.assertTrue(DefaultHostnameVerifier.matchIdentity("a.a.b.c", "a*.b .c")); Assert.assertTrue(DefaultHostnameVerifier.matchIdentity("a.a.b.c", "a*.b .c"));
Assert.assertFalse(DefaultHostnameVerifier.matchIdentityStrict("a.a.b.c" , "a*.b.c")); Assert.assertFalse(DefaultHostnameVerifier.matchIdentityStrict("a.a.b.c" , "a*.b.c"));
} }
@Test @Test
public void testHTTPCLIENT_1255() { public void testHTTPCLIENT_1255() {
Assert.assertTrue(DefaultHostnameVerifier.matchIdentity("mail.a.b.c.com" , "m*.a.b.c.com")); Assert.assertTrue(DefaultHostnameVerifier.matchIdentity("mail.a.b.c.com" , "m*.a.b.c.com"));
Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict("mail.a.b. c.com", "m*.a.b.c.com")); Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict("mail.a.b. c.com", "m*.a.b.c.com"));
} }
@Test
public void testHTTPCLIENT_1997() {
Assert.assertTrue(DefaultHostnameVerifier.matchIdentity(
"service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a"));
Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict(
"service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a"));
Assert.assertTrue(DefaultHostnameVerifier.matchIdentity(
"service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a", publicSuff
ixMatcher));
Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict(
"service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a", publicSuff
ixMatcher));
}
@Test // Check compressed IPv6 hostname matching @Test // Check compressed IPv6 hostname matching
public void testHTTPCLIENT_1316() throws Exception{ public void testHTTPCLIENT_1316() throws Exception{
final String host1 = "2001:0db8:aaaa:bbbb:cccc:0:0:0001"; final String host1 = "2001:0db8:aaaa:bbbb:cccc:0:0:0001";
DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(SubjectNam e.IP("2001:0db8:aaaa:bbbb:cccc:0:0:0001"))); DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(SubjectNam e.IP("2001:0db8:aaaa:bbbb:cccc:0:0:0001")));
DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(SubjectNam e.IP("2001:0db8:aaaa:bbbb:cccc::1"))); DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(SubjectNam e.IP("2001:0db8:aaaa:bbbb:cccc::1")));
try { try {
DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(Subjec tName.IP("2001:0db8:aaaa:bbbb:cccc::10"))); DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList(Subjec tName.IP("2001:0db8:aaaa:bbbb:cccc::10")));
Assert.fail("SSLException expected"); Assert.fail("SSLException expected");
} catch (final SSLException expected) { } catch (final SSLException expected) {
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added

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