client.close();
}
}
private static SSLEngineConfigurator createSSLConfig() throws Exception {
final SSLContextConfigurator sslContextConfigurator = new SSLContextConfigurator();
final ClassLoader cl = GrizzlyFeedableBodyGeneratorTest.class.getClassLoader();
// override system properties
final URL cacertsUrl = cl.getResource("ssltest-cacerts.jks");
if (cacertsUrl != null) {
sslContextConfigurator.setTrustStoreFile(cacertsUrl.getFile());
sslContextConfigurator.setTrustStorePass("changeit");
}
// override system properties
final URL keystoreUrl = cl.getResource("ssltest-keystore.jks");
if (keystoreUrl != null) {
sslContextConfigurator.setKeyStoreFile(keystoreUrl.getFile());
sslContextConfigurator.setKeyStorePass("changeit");
}
return new SSLEngineConfigurator(sslContextConfigurator.createSSLContext(), false, false, false);
}