@Test
public void testSetAllData() throws Exception {
String keyStoreStr = getPath("resources/defaultkeystore");
SSLClientPolicy sslClientPolicy = new SSLClientPolicy();
sslClientPolicy.setKeystore(keyStoreStr);
sslClientPolicy.setKeystoreType("JKS");
sslClientPolicy.setKeyPassword("defaultkeypass");
sslClientPolicy.setKeystorePassword("defaultkeypass");
sslClientPolicy.setTrustStoreType("JKS");
//sslClientPolicy.setTrustStoreAlgorithm("JKS");
sslClientPolicy.setSecureSocketProtocol("TLSv1");
sslClientPolicy.setSessionCacheKey("Anything");
sslClientPolicy.setSessionCaching(true);
sslClientPolicy.setMaxChainLength(new Long(2));
sslClientPolicy.setCertValidator("Anything");
sslClientPolicy.setProxyHost("Anything");
sslClientPolicy.setProxyPort(new Long(1234));
for (int i = 0; i < EXPORT_CIPHERS.length; i++) {
sslClientPolicy.getCiphersuites().add(EXPORT_CIPHERS[i]);
}
for (int i = 0; i < NON_EXPORT_CIPHERS.length; i++) {
sslClientPolicy.getCiphersuites().add(NON_EXPORT_CIPHERS[i]);
}
String trustStoreStr = getPath("resources/defaulttruststore");
sslClientPolicy.setTrustStore(trustStoreStr);
TestLogHandler handler = new TestLogHandler();
HttpsURLConnectionFactory factory = createFactory(sslClientPolicy,
"https://dummyurl",
handler);