Examples of SslContextFactory


Examples of org.apache.qpid.ssl.SSLContextFactory

               
        String keyStorePath = System.getProperty("javax.net.ssl.keyStore",trustStorePath);
        String keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword",trustStorePassword);
        String keyStoreCertType = System.getProperty("qpid.ssl.keyStoreCertType","SunX509");
       
        SSLContextFactory sslContextFactory = new SSLContextFactory(trustStorePath,trustStorePassword,
                                                                    trustStoreCertType,keyStorePath,
                                                                    keyStorePassword,keyStoreCertType);
       
        return sslContextFactory.buildServerContext();
       
    }
View Full Code Here

Examples of org.apache.qpid.ssl.SSLContextFactory


            String keystorePath = serverConfig.getKeystorePath();
            String keystorePassword = serverConfig.getKeystorePassword();
            String certType = serverConfig.getCertType();
            SSLContextFactory sslFactory = null;

            if (!serverConfig.getSSLOnly())
            {

                for(int port : ports)
                {

                    NetworkDriver driver = new MINANetworkDriver();

                    Set<VERSION> supported = EnumSet.allOf(VERSION.class);

                    if(exclude_0_10.contains(port))
                    {
                        supported.remove(VERSION.v0_10);
                    }

                    if(exclude_0_9_1.contains(port))
                    {
                        supported.remove(VERSION.v0_9_1);
                    }
                    if(exclude_0_9.contains(port))
                    {
                        supported.remove(VERSION.v0_9);
                    }
                    if(exclude_0_8.contains(port))
                    {
                        supported.remove(VERSION.v0_8);
                    }

                    MultiVersionProtocolEngineFactory protocolEngineFactory =
                            new MultiVersionProtocolEngineFactory(hostName, supported);



                    driver.bind(port, new InetAddress[]{bindAddress}, protocolEngineFactory,
                                serverConfig.getNetworkConfiguration(), null);
                    ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, port),
                                                                  new QpidAcceptor(driver,"TCP"));
                    //CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                    _logger.info("Qpid broker TCP port : " + port);
                }

            }

            if (serverConfig.getEnableSSL())
            {
                sslFactory = new SSLContextFactory(keystorePath, keystorePassword, certType);
                NetworkDriver driver = new MINANetworkDriver();

                //int port = serverConfig.getSSLPort();
                String sslPort = commandLine.getOptionValue("s");
                int port = 0;
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        Resource keystore = Resource.newClassPathResource("/keystore");
        if (keystore != null && keystore.exists()) {
            connector.setConfidentialPort(8443);

            SslContextFactory factory = new SslContextFactory();
            factory.setKeyStoreResource(keystore);
            factory.setKeyStorePassword("wicket");
            factory.setTrustStoreResource(keystore);
            factory.setKeyManagerPassword("wicket");
            SslSocketConnector sslConnector = new SslSocketConnector(factory);
            sslConnector.setMaxIdleTime(timeout);
            sslConnector.setPort(8443);
            sslConnector.setAcceptors(4);
            server.addConnector(sslConnector);
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        // the value is already set.  We therefore do not need to look at the component
        // level SSLContextParameters again in this method.
        SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
       
        if (endpointSslContextParameters != null) {
            SslContextFactory contextFact = createSslContextFactory(endpointSslContextParameters);
            for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
                if (c.getParameterTypes().length == 1
                    && c.getParameterTypes()[0].isInstance(contextFact)) {
                    answer = (SslSelectChannelConnector)c.newInstance(contextFact);
                }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        }
        return answer;
    }
   
    private SslContextFactory createSslContextFactory(SSLContextParameters ssl) throws GeneralSecurityException, IOException {
        SslContextFactory answer = new SslContextFactory() {

            // This method is for Jetty 7.0.x ~ 7.4.x
            @SuppressWarnings("unused")
            public boolean checkConfig() {
                if (getSslContext() == null) {
                    return checkSSLContextFactoryConfig(this);
                } else {
                    return true;
                }
            }
            // This method is for Jetty 7.5.x
            public void checkKeyStore() {
                // here we don't check the SslContext as it is already created
            }
           
        };
        answer.setSslContext(ssl.createSSLContext());
        return answer;
    }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        // the value is already set.  We therefore do not need to look at the component
        // level SSLContextParameters again in this method.
        SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
       
        if (endpointSslContextParameters != null) {
            SslContextFactory contextFact = new SslContextFactory() {

                // This method is for Jetty 7.0.x ~ 7.4.x
                @SuppressWarnings("unused")
                public boolean checkConfig() {
                    if (getSslContext() == null) {
                        return checkSSLContextFactoryConfig(this);
                    } else {
                        return true;
                    }
                }
                // This method is for Jetty 7.5.x
                public void checkKeyStore() {
                    // here we don't check the SslContext as it is already created
                }
               
            };
            contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
            for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
                if (c.getParameterTypes().length == 1
                    && c.getParameterTypes()[0].isInstance(contextFact)) {
                    answer = (SslSelectChannelConnector)c.newInstance(contextFact);
                }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        // the value is already set.  We therefore do not need to look at the component
        // level SSLContextParameters again in this method.
        SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
       
        if (endpointSslContextParameters != null) {
            SslContextFactory contextFact = new SslContextFactory() {

                // This method is for Jetty 7.0.x ~ 7.4.x
                @SuppressWarnings("unused")
                public boolean checkConfig() {
                    if (getSslContext() == null) {
                        return checkSSLContextFactoryConfig(this);
                    } else {
                        return true;
                    }
                }
                // This method is for Jetty 7.5.x
                public void checkKeyStore() {
                    // here we don't check the SslContext as it is already created
                }
               
            };
            contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
            for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
                if (c.getParameterTypes().length == 1
                    && c.getParameterTypes()[0].isInstance(contextFact)) {
                    answer = (SslSelectChannelConnector)c.newInstance(contextFact);
                }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        // the value is already set.  We therefore do not need to look at the component
        // level SSLContextParameters again in this method.
        SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
       
        if (endpointSslContextParameters != null) {
            SslContextFactory contextFact = new SslContextFactory() {

                // This method is for Jetty 7.0.x ~ 7.4.x
                @SuppressWarnings("unused")
                public boolean checkConfig() {
                    if (getSslContext() == null) {
                        return checkSSLContextFactoryConfig(this);
                    } else {
                        return true;
                    }
                }
                // This method is for Jetty 7.5.x
                public void checkKeyStore() {
                    // here we don't check the SslContext as it is already created
                }
               
            };
            contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
            for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
                if (c.getParameterTypes().length == 1
                    && c.getParameterTypes()[0].isInstance(contextFact)) {
                    answer = (SslSelectChannelConnector)c.newInstance(contextFact);
                }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        // the value is already set.  We therefore do not need to look at the component
        // level SSLContextParameters again in this method.
        SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
       
        if (endpointSslContextParameters != null) {
            SslContextFactory contextFact = new SslContextFactory() {

                // This method is for Jetty 7.0.x ~ 7.4.x
                @SuppressWarnings("unused")
                public boolean checkConfig() {
                    if (getSslContext() == null) {
                        return checkSSLContextFactoryConfig(this);
                    } else {
                        return true;
                    }
                }
                // This method is for Jetty 7.5.x
                public void checkKeyStore() {
                    // here we don't check the SslContext as it is already created
                }
               
            };
            contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
            for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
                if (c.getParameterTypes().length == 1
                    && c.getParameterTypes()[0].isInstance(contextFact)) {
                    answer = (SslSelectChannelConnector)c.newInstance(contextFact);
                }
View Full Code Here

Examples of org.eclipse.jetty.http.ssl.SslContextFactory

        Resource keystore = Resource.newClassPathResource("/keystore");
        if (keystore != null && keystore.exists()) {
            connector.setConfidentialPort(8443);

            SslContextFactory factory = new SslContextFactory();
            factory.setKeyStoreResource(keystore);
            factory.setKeyStorePassword("wicket");
            factory.setTrustStoreResource(keystore);
            factory.setKeyManagerPassword("wicket");
            SslSocketConnector sslConnector = new SslSocketConnector(factory);
            sslConnector.setMaxIdleTime(timeout);
            sslConnector.setPort(8443);
            sslConnector.setAcceptors(4);
            server.addConnector(sslConnector);
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.