store.load(new FileInputStream(trustStoreFile), password.toCharArray());
return store;
}
private SSLContext createSSLContext() throws Exception {
TLSClientParameters tlsParams = new TLSClientParameters();
KeyStore trustStore = loadStore("src/test/java/org/apache/cxf/systest/http/resources/Truststore.jks",
"password");
TrustManagerFactory tmf =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(trustStore);
tlsParams.setTrustManagers(tmf.getTrustManagers());
KeyStore keyStore = loadStore("src/test/java/org/apache/cxf/systest/http/resources/Morpit.jks",
"password");
KeyManagerFactory kmf =
KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(keyStore, "password".toCharArray());
tlsParams.setKeyManagers(kmf.getKeyManagers());
return SSLUtils.getSSLContext(tlsParams);
}