"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.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").

TestDefaultHostnameVerifier.java  (httpcomponents-client-4.5.5-src):TestDefaultHostnameVerifier.java  (httpcomponents-client-4.5.6-src)
skipping to change at line 167 skipping to change at line 167
in = new ByteArrayInputStream(CertificatesToPlayWith.S_GOOGLE_COM); in = new ByteArrayInputStream(CertificatesToPlayWith.S_GOOGLE_COM);
x509 = (X509Certificate) cf.generateCertificate(in); x509 = (X509Certificate) cf.generateCertificate(in);
impl.verify("*.Google.com", x509); impl.verify("*.Google.com", x509);
in = new ByteArrayInputStream(CertificatesToPlayWith.IP_1_1_1_1); in = new ByteArrayInputStream(CertificatesToPlayWith.IP_1_1_1_1);
x509 = (X509Certificate) cf.generateCertificate(in); x509 = (X509Certificate) cf.generateCertificate(in);
impl.verify("1.1.1.1", x509); impl.verify("1.1.1.1", x509);
exceptionPlease(impl, "1.1.1.2", x509); exceptionPlease(impl, "1.1.1.2", x509);
exceptionPlease(impl, "dummy-value.com", x509); exceptionPlease(impl, "dummy-value.com", x509);
in = new ByteArrayInputStream(CertificatesToPlayWith.EMAIL_ALT_SUBJECT_N
AME);
x509 = (X509Certificate) cf.generateCertificate(in);
impl.verify("www.company.com", x509);
} }
@Test @Test
public void testSubjectAlt() throws Exception { public void testSubjectAlt() throws Exception {
final CertificateFactory cf = CertificateFactory.getInstance("X.509"); final CertificateFactory cf = CertificateFactory.getInstance("X.509");
final InputStream in = new ByteArrayInputStream(CertificatesToPlayWith.X 509_MULTIPLE_SUBJECT_ALT); final InputStream in = new ByteArrayInputStream(CertificatesToPlayWith.X 509_MULTIPLE_SUBJECT_ALT);
final X509Certificate x509 = (X509Certificate) cf.generateCertificate(in ); final X509Certificate x509 = (X509Certificate) cf.generateCertificate(in );
Assert.assertEquals("CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST= Unknown, C=CH", Assert.assertEquals("CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST= Unknown, C=CH",
x509.getSubjectDN().getName()); x509.getSubjectDN().getName());
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

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