use of android.net.http.SslCertificate in project android_frameworks_base by ResurrectionRemix.
the class SslCertificateTest method testSslCertificateWithMultipleCN.
@LargeTest
public void testSslCertificateWithMultipleCN() throws Exception {
X509Certificate x509Certificate = generateCertificate(Issue41662Certificate);
String dn = x509Certificate.getSubjectDN().getName();
assertTrue(dn, dn.contains("Posta CA 1"));
assertTrue(dn, dn.contains("Configuration"));
SslCertificate sslCertificate = new SslCertificate(x509Certificate);
assertEquals(dn, "Posta CA 1", sslCertificate.getIssuedTo().getCName());
}
use of android.net.http.SslCertificate in project android_frameworks_base by ResurrectionRemix.
the class SslCertificateTest method testSslCertificateWithEmptyIssuer.
@LargeTest
public void testSslCertificateWithEmptyIssuer() throws Exception {
X509Certificate x509Certificate = generateCertificate(Issue1597Certificate);
assertEquals("", x509Certificate.getSubjectDN().getName());
SslCertificate sslCertificate = new SslCertificate(x509Certificate);
assertEquals("", sslCertificate.getIssuedBy().getDName());
}
use of android.net.http.SslCertificate in project android_frameworks_base by DirtyUnicorns.
the class SslCertificateTest method testSslCertificateWithMultipleCN.
@LargeTest
public void testSslCertificateWithMultipleCN() throws Exception {
X509Certificate x509Certificate = generateCertificate(Issue41662Certificate);
String dn = x509Certificate.getSubjectDN().getName();
assertTrue(dn, dn.contains("Posta CA 1"));
assertTrue(dn, dn.contains("Configuration"));
SslCertificate sslCertificate = new SslCertificate(x509Certificate);
assertEquals(dn, "Posta CA 1", sslCertificate.getIssuedTo().getCName());
}
use of android.net.http.SslCertificate in project android_frameworks_base by crdroidandroid.
the class SslCertificateTest method testSslCertificateWithEmptyIssuer.
@LargeTest
public void testSslCertificateWithEmptyIssuer() throws Exception {
X509Certificate x509Certificate = generateCertificate(Issue1597Certificate);
assertEquals("", x509Certificate.getSubjectDN().getName());
SslCertificate sslCertificate = new SslCertificate(x509Certificate);
assertEquals("", sslCertificate.getIssuedBy().getDName());
}
use of android.net.http.SslCertificate in project assertj-android by square.
the class WebViewAssert method hasCertificate.
public WebViewAssert hasCertificate(SslCertificate certificate) {
isNotNull();
SslCertificate actualCertificate = actual.getCertificate();
//
assertThat(actualCertificate).overridingErrorMessage("Expected certificate <%s> but was <%s>.", certificate, //
actualCertificate).isSameAs(certificate);
return this;
}
Aggregations