Search in sources :

Example 1 with TlsPropertiesSocketFactory

use of org.mule.runtime.core.internal.secutiry.tls.TlsPropertiesSocketFactory in project mule by mulesoft.

the class TlsPropertiesSocketTestCase method testSimpleSocket.

@Test
public void testSimpleSocket() throws Exception {
    TlsConfiguration configuration = new TlsConfiguration(TlsConfiguration.DEFAULT_KEYSTORE);
    configuration.setKeyPassword("mulepassword");
    configuration.setKeyStorePassword("mulepassword");
    configuration.setKeyStore("clientKeystore");
    configuration.initialise(false, TlsConfiguration.JSSE_NAMESPACE);
    TlsPropertiesSocketFactory socketFactory = new TlsPropertiesSocketFactory(true, TlsConfiguration.JSSE_NAMESPACE);
    assertTrue("socket is useless", socketFactory.getSupportedCipherSuites().length > 0);
}
Also used : TlsPropertiesSocketFactory(org.mule.runtime.core.internal.secutiry.tls.TlsPropertiesSocketFactory) TlsConfiguration(org.mule.runtime.core.privileged.security.tls.TlsConfiguration) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TlsPropertiesSocketFactory (org.mule.runtime.core.internal.secutiry.tls.TlsPropertiesSocketFactory)1 TlsConfiguration (org.mule.runtime.core.privileged.security.tls.TlsConfiguration)1