use of org.apache.harmony.xnet.tests.support.X509TrustManagerImpl in project robovm by robovm.
the class X509TrustManagerTest method test_checkServerTrusted_01.
/**
* javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[] chain, String authType)
*/
public void test_checkServerTrusted_01() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
X509Certificate[] xcert = null;
try {
xtm.checkServerTrusted(xcert, "SSL");
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
xcert = new X509Certificate[0];
try {
xtm.checkServerTrusted(xcert, "SSL");
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
xcert = setX509Certificate();
try {
xtm.checkServerTrusted(xcert, null);
fail("IllegalArgumentException wasn't thrown");
} catch (IllegalArgumentException expected) {
}
try {
xtm.checkServerTrusted(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_getAcceptedIssuers.
/**
* javax.net.ssl.X509TrustManager#getAcceptedIssuers()
*/
public void test_getAcceptedIssuers() throws Exception {
X509TrustManagerImpl xtm = new X509TrustManagerImpl();
assertNotNull(xtm.getAcceptedIssuers());
}
Aggregations