Search in sources :

Example 6 with SSLHandlerFactory

use of org.apache.flink.runtime.io.network.netty.SSLHandlerFactory in project flink by apache.

the class SSLUtilsTest method testRESTServerSSL.

// ------------------------ server --------------------------
/**
 * Tests that REST Server SSL Engine is created given a valid SSL configuration.
 */
@Test
public void testRESTServerSSL() throws Exception {
    Configuration serverConfig = createRestSslConfigWithKeyStore();
    SSLHandlerFactory ssl = SSLUtils.createRestServerSSLEngineFactory(serverConfig);
    assertNotNull(ssl);
}
Also used : Configuration(org.apache.flink.configuration.Configuration) SSLHandlerFactory(org.apache.flink.runtime.io.network.netty.SSLHandlerFactory) Test(org.junit.Test)

Example 7 with SSLHandlerFactory

use of org.apache.flink.runtime.io.network.netty.SSLHandlerFactory in project flink by apache.

the class SSLUtilsTest method testRESTClientSSL.

// ------------------------ REST client --------------------------
/**
 * Tests if REST Client SSL is created given a valid SSL configuration.
 */
@Test
public void testRESTClientSSL() throws Exception {
    Configuration clientConfig = createRestSslConfigWithTrustStore();
    SSLHandlerFactory ssl = SSLUtils.createRestClientSSLEngineFactory(clientConfig);
    assertNotNull(ssl);
}
Also used : Configuration(org.apache.flink.configuration.Configuration) SSLHandlerFactory(org.apache.flink.runtime.io.network.netty.SSLHandlerFactory) Test(org.junit.Test)

Aggregations

SSLHandlerFactory (org.apache.flink.runtime.io.network.netty.SSLHandlerFactory)7 Configuration (org.apache.flink.configuration.Configuration)3 Test (org.junit.Test)3 IllegalConfigurationException (org.apache.flink.configuration.IllegalConfigurationException)2 ClientAuth (org.apache.flink.shaded.netty4.io.netty.handler.ssl.ClientAuth)2 JdkSslContext (org.apache.flink.shaded.netty4.io.netty.handler.ssl.JdkSslContext)2 SslContext (org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslContext)2 ConfigurationException (org.apache.flink.util.ConfigurationException)2 Path (java.nio.file.Path)1 SslHandler (org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslHandler)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1