use of org.apache.ignite.ssl.SslContextFactory in project ignite by apache.
the class JdbcThinConnectionSSLTest method getTestSslContextFactory.
/**
* @return Test SSL context factory.
*/
private static Factory<SSLContext> getTestSslContextFactory() {
SslContextFactory factory = new SslContextFactory();
factory.setCipherSuites(supportedCiphers);
factory.setKeyStoreFilePath(SRV_KEY_STORE_PATH);
factory.setKeyStorePassword("123456".toCharArray());
factory.setTrustStoreFilePath(TRUST_KEY_STORE_PATH);
factory.setTrustStorePassword("123456".toCharArray());
return factory;
}
use of org.apache.ignite.ssl.SslContextFactory in project ignite by apache.
the class CommonSecurityCheckTest method getClientSslContextFactory.
/**
* @return SSL context factory for clients.
*/
@NotNull
protected SslContextFactory getClientSslContextFactory() {
SslContextFactory sslFactory = (SslContextFactory) GridTestUtils.sslFactory();
sslFactory.setKeyStoreFilePath(U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.client.path")).getAbsolutePath());
return sslFactory;
}
use of org.apache.ignite.ssl.SslContextFactory in project ignite by apache.
the class SslParametersTest method createSslFactory.
/**
* @return SSL factory.
*/
@NotNull
private SslContextFactory createSslFactory() {
SslContextFactory factory = (SslContextFactory) GridTestUtils.sslTrustedFactory("node01", "trustone");
factory.setCipherSuites(cipherSuites);
factory.setProtocols(protocols);
return factory;
}
use of org.apache.ignite.ssl.SslContextFactory in project ignite by apache.
the class GridTestUtils method sslFactory.
/**
* Creates test-purposed SSL context factory from test key store with disabled trust manager.
*
* @return SSL context factory used in test.
*/
public static Factory<SSLContext> sslFactory() {
SslContextFactory factory = new SslContextFactory();
factory.setKeyStoreFilePath(U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.path")).getAbsolutePath());
factory.setKeyStorePassword(keyStorePassword().toCharArray());
factory.setTrustManagers(SslContextFactory.getDisabledTrustManager());
return factory;
}
use of org.apache.ignite.ssl.SslContextFactory in project ignite by apache.
the class DiscoveryClientSocketTest method before.
/**
* Configure SSL and Discovery.
*/
@Before
public void before() {
SslContextFactory socketFactory = (SslContextFactory) GridTestUtils.sslTrustedFactory("node01", "trustone");
SSLContext sslCtx = socketFactory.create();
sslSrvSockFactory = sslCtx.getServerSocketFactory();
sslSockFactory = sslCtx.getSocketFactory();
fakeTcpDiscoverySpi = new TcpDiscoverySpi();
fakeTcpDiscoverySpi.setSoLinger(1);
}
Aggregations