Package org.mule.api.security.tls

Examples of org.mule.api.security.tls.TlsConfiguration.initialise()


    {
        TlsConfiguration configuration = new TlsConfiguration(TlsConfiguration.DEFAULT_KEYSTORE);
        configuration.setKeyPassword("mulepassword");
        configuration.setKeyStorePassword("mulepassword");
        configuration.setKeyStore("clientKeystore");
        configuration.initialise(false, TlsConfiguration.JSSE_NAMESPACE);
        SSLSocketFactory socketFactory = configuration.getSocketFactory();
        assertTrue("socket is useless", socketFactory.getSupportedCipherSuites().length > 0);
    }

    @Test
View Full Code Here


        config.setKeyPassword("mulepassword");
        config.setKeyAlias("this_key_does_not_exist_in_the_keystore");

        try
        {
            config.initialise(false, TlsConfiguration.JSSE_NAMESPACE);
        }
        catch (CreateException ce)
        {
            assertTrue(ce.getCause() instanceof IllegalStateException);
        }
View Full Code Here

        File configFile = createDefaultConfigFile();

        try
        {
            TlsConfiguration tlsConfiguration = new TlsConfiguration(TlsConfiguration.DEFAULT_KEYSTORE);
            tlsConfiguration.initialise(true, TlsConfiguration.JSSE_NAMESPACE);

            SSLSocket socket = (SSLSocket) tlsConfiguration.getSocketFactory().createSocket();
            SSLServerSocket serverSocket = (SSLServerSocket) tlsConfiguration.getServerSocketFactory().createServerSocket();

            assertArrayEquals(new String[] {SUPPORTED_CIPHER_SUITE}, socket.getEnabledCipherSuites());
View Full Code Here

        File configFile = createDefaultConfigFile();

        try
        {
            TlsConfiguration tlsConfiguration = new TlsConfiguration(TlsConfiguration.DEFAULT_KEYSTORE);
            tlsConfiguration.initialise(true, TlsConfiguration.JSSE_NAMESPACE);

            SSLSocket socket = (SSLSocket) tlsConfiguration.getSocketFactory().createSocket();
            SSLServerSocket serverSocket = (SSLServerSocket) tlsConfiguration.getServerSocketFactory().createServerSocket();

            assertArrayEquals(new String[] {SUPPORTED_PROTOCOL}, socket.getEnabledProtocols());
View Full Code Here

        File file = createConfigFile(TEST_SECURITY_MODEL, "enabledCipherSuites=TEST");

        try
        {
            TlsConfiguration tlsConfiguration = new TlsConfiguration(TlsConfiguration.DEFAULT_KEYSTORE);
            tlsConfiguration.initialise(true, TlsConfiguration.JSSE_NAMESPACE);

            assertArrayEquals(new String[] {"TEST"}, tlsConfiguration.getEnabledCipherSuites());
        }
        finally
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.