use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkClientTrusted_01.
public void test_checkClientTrusted_01() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = null;
try {
xtm.checkClientTrusted(xcert, "SSL");
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
xcert = new X509Certificate[0];
try {
xtm.checkClientTrusted(xcert, "SSL");
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
xcert = setX509Certificate();
try {
xtm.checkClientTrusted(xcert, null);
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
try {
xtm.checkClientTrusted(xcert, "");
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
}
use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkClientTrusted_02.
/**
* javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[] chain, String authType)
*/
public void test_checkClientTrusted_02() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = setInvalid();
try {
xtm.checkClientTrusted(xcert, "SSL");
fail("CertificateException wasn't thrown");
} catch (CertificateException expected) {
}
}
use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkServerTrusted_02.
/**
* javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[] chain, String authType)
*/
public void test_checkServerTrusted_02() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = setInvalid();
try {
xtm.checkServerTrusted(xcert, "SSL");
fail("CertificateException wasn't thrown");
} catch (CertificateException expected) {
}
}
use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkClientTrusted_03.
/**
* javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[] chain, String authType)
*/
public void test_checkClientTrusted_03() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = setX509Certificate();
xtm.checkClientTrusted(xcert, "SSL");
}
use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkServerTrusted_03.
/**
* javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[] chain, String authType)
*/
public void test_checkServerTrusted_03() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = setX509Certificate();
xtm.checkServerTrusted(xcert, "SSL");
}
Aggregations