*/
@Test
public void testSetAllData() throws Exception {
String keyStoreStr = getPath("resources/defaultkeystore");
SSLServerPolicy sslServerPolicy = new SSLServerPolicy();
sslServerPolicy.setKeystore(keyStoreStr);
sslServerPolicy.setKeystoreType("JKS");
sslServerPolicy.setKeyPassword("defaultkeypass");
sslServerPolicy.setKeystorePassword("defaultkeypass");
sslServerPolicy.setTrustStoreType("JKS");
sslServerPolicy.setTrustStoreAlgorithm("JKS");
sslServerPolicy.setSecureSocketProtocol("TLSv1");
sslServerPolicy.setSessionCacheKey("Anything");
sslServerPolicy.setSessionCaching(true);
sslServerPolicy.setMaxChainLength(new Long(2));
sslServerPolicy.setCertValidator("Anything");
String trustStoreStr = getPath("resources/defaulttruststore");
sslServerPolicy.setTrustStore(trustStoreStr);
TestLogHandler handler = new TestLogHandler();
JettySslConnectorFactory factory = null;
String oldHome = overrideHome();
try {
factory = createFactory(sslServerPolicy,
"https://dummyurl",
handler);
factory.decorate(sslConnector);
} finally {
restoreHome(oldHome);
}
assertTrue("Keystore not set properly",
sslConnector.getKeystore().contains("resources/defaultkeystore"));
String trustStr = System.getProperty("javax.net.ssl.trustStore");
assertTrue("Trust store loaded success message not present",
trustStr.contains("resources/defaulttruststore"));
assertTrue("Keystore type not being read",
sslConnector.getKeystoreType().equals("JKS"));
assertTrue("Keystore password not being read",
sslServerPolicy.getKeystorePassword().equals("defaultkeypass"));
assertTrue("Key password not being read",
sslServerPolicy.getKeyPassword().equals("defaultkeypass"));
//assertNotNull("Default filtered ciphersuites not set on listener",
// sslConnector.getExcludeCipherSuites());
assertTrue("Truststore type not being read",