Examples of SSLConfig


Examples of org.apache.solr.client.solrj.embedded.SSLConfig

        System.setProperty("solr.data.dir", "target/test-classes/solr/data" + (dataDirNo++));

        // Instruct Solr to keep the index in memory, for faster testing.
        System.setProperty("solr.directoryFactory", "solr.RAMDirectoryFactory");

        SSLConfig sslConfig = buildSSLConfig(ssl, false);

        context = context == null ? "/solr" : context;
        JettySolrRunner jetty = new JettySolrRunner(solrHome, context, 0, configFile, schemaFile,
                                                    stopAtShutdown, extraServlets, sslConfig);
View Full Code Here

Examples of org.glassfish.embeddable.web.config.SslConfig

        if (webListener instanceof HttpsListener) {

            HttpsListener listener = (HttpsListener) webListener;
            newSsl.setCertNickname("s1as");
            SslConfig sslConfig = listener.getSslConfig();
            if (sslConfig == null) {
                return;
            }

            if (sslConfig.getKeyStore() != null) {
                newSsl.setKeyStore(sslConfig.getKeyStore());
            }
            if (sslConfig.getKeyPassword() != null) {
                newSsl.setKeyStorePassword(new String(sslConfig.getKeyPassword()));
            }
            if (sslConfig.getTrustStore() != null) {
                newSsl.setTrustStore(sslConfig.getTrustStore());
            }

            if (sslConfig.getAlgorithms() != null) {
                for (SslType sslType : sslConfig.getAlgorithms()) {
                    if (sslType.equals(SslType.SSLv2)) {
                        newSsl.setSsl2Enabled("true");
                    }
                    if (sslType.equals(SslType.SSLv3)) {
                        newSsl.setSsl3Enabled("true");
                    }
                    if (sslType.equals(SslType.TLS)) {
                        newSsl.setSsl3TlsCiphers("true");
                    }
                }
            }  
            if (sslConfig.getHandshakeTimeout() > 0) {
                newSsl.setSSLInactivityTimeout(sslConfig.getHandshakeTimeout());
            }
        } else {
            log.severe("HttpsListener required for https protocol");
        }
View Full Code Here

Examples of org.glassfish.embeddable.web.config.SslConfig

        if (webListener instanceof HttpsListener) {

            HttpsListener listener = (HttpsListener) webListener;
            newSsl.setCertNickname("s1as");
            SslConfig sslConfig = listener.getSslConfig();
            if (sslConfig == null) {
                return;
            }

            if (sslConfig.getKeyStore() != null) {
                newSsl.setKeyStore(sslConfig.getKeyStore());
            }
            if (sslConfig.getKeyPassword() != null) {
                newSsl.setKeyStorePassword(new String(sslConfig.getKeyPassword()));
            }
            if (sslConfig.getTrustStore() != null) {
                newSsl.setTrustStore(sslConfig.getTrustStore());
            }

            if (sslConfig.getAlgorithms() != null) {
                for (SslType sslType : sslConfig.getAlgorithms()) {
                    if (sslType.equals(SslType.SSLv2)) {
                        newSsl.setSsl2Enabled("true");
                    }
                    if (sslType.equals(SslType.SSLv3)) {
                        newSsl.setSsl3Enabled("true");
                    }
                    if (sslType.equals(SslType.TLS)) {
                        newSsl.setSsl3TlsCiphers("true");
                    }
                }
            }  
            if (sslConfig.getHandshakeTimeout() > 0) {
                newSsl.setSSLInactivityTimeout(sslConfig.getHandshakeTimeout());
            }

            newSsl.setCertNickname("s1as");
            newSsl.setClassname("com.sun.enterprise.security.ssl.GlassfishSSLImpl");
View Full Code Here

Examples of org.glassfish.embeddable.web.config.SslConfig

        if (webListener instanceof HttpsListener) {

            HttpsListener listener = (HttpsListener) webListener;
            newSsl.setCertNickname("s1as");
            SslConfig sslConfig = listener.getSslConfig();
            if (sslConfig == null) {
                return;
            }

            if (sslConfig.getKeyStore() != null) {
                newSsl.setKeyStore(sslConfig.getKeyStore());
            }
            if (sslConfig.getKeyPassword() != null) {
                newSsl.setKeyStorePassword(new String(sslConfig.getKeyPassword()));
            }
            if (sslConfig.getTrustStore() != null) {
                newSsl.setTrustStore(sslConfig.getTrustStore());
            }

            if (sslConfig.getAlgorithms() != null) {
                for (SslType sslType : sslConfig.getAlgorithms()) {
                    if (sslType.equals(SslType.SSLv2)) {
                        newSsl.setSsl2Enabled("true");
                    }
                    if (sslType.equals(SslType.SSLv3)) {
                        newSsl.setSsl3Enabled("true");
                    }
                    if (sslType.equals(SslType.TLS)) {
                        newSsl.setSsl3TlsCiphers("true");
                    }
                }
            }  
            if (sslConfig.getHandshakeTimeout() > 0) {
                newSsl.setSSLInactivityTimeout(sslConfig.getHandshakeTimeout());
            }
        } else {
            log.severe("HttpsListener required for https protocol");
        }
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

            client = getJerseyClient();
        }
        try {
            ServiceLocator habitat = SecurityServicesUtil.getInstance().getHabitat();
            SecureAdmin secureAdmin = habitat.getService(SecureAdmin.class);
            client.setProperty(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(),
                                                                                          habitat.<SSLUtils>getService(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null)));
            client.register(CsrfProtectionFilter.class);

        } catch (Exception ex) {
            Throwable cause = ex;
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

            client = getJerseyClient();
        }
        try {
            ServiceLocator habitat = SecurityServicesUtil.getInstance().getHabitat();
            SecureAdmin secureAdmin = habitat.getService(SecureAdmin.class);
            client.property(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(),
                                                                                          habitat.<SSLUtils>getService(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null)));
            client.register(CsrfProtectionFilter.class);

        } catch (Exception ex) {
            Throwable cause = ex;
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

            client = getJerseyClient();
        }
        try {
            ServiceLocator habitat = SecurityServicesUtil.getInstance().getHabitat();
            SecureAdmin secureAdmin = habitat.getService(SecureAdmin.class);
            client.configuration().setProperty(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(),
                                                                                          habitat.<SSLUtils>getService(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null)));
            client.configuration().register(CsrfProtectionFilter.class);

        } catch (Exception ex) {
            Throwable cause = ex;
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

            client = getJerseyClient();
        }
        try {
            ServiceLocator habitat = SecurityServicesUtil.getInstance().getHabitat();
            SecureAdmin secureAdmin = habitat.getService(SecureAdmin.class);
            client.property(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(),
                                                                                          habitat.<SSLUtils>getService(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null)));
            client.register(CsrfProtectionFilter.class);

        } catch (Exception ex) {
            Throwable cause = ex;
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

        do {
            Metrix.event("doRestCommand() - about to create target");
            WebTarget target = createTarget(uri);
            Metrix.event("doRestCommand() - about to configure security");
            target.configuration().setProperty(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(host), getSslContext()));
            /*
             * Any code that wants to trigger a retry will say so explicitly.
             */
            shouldTryCommandAgain = false;
            try {
View Full Code Here

Examples of org.glassfish.jersey.client.SslConfig

        do {
            Metrix.event("doRestCommand() - about to create target");
            WebTarget target = createTarget(uri);
            Metrix.event("doRestCommand() - about to configure security");
            target.property(ClientProperties.SSL_CONFIG, new SslConfig(new BasicHostnameVerifier(host), getSslContext()));
            /*
             * Any code that wants to trigger a retry will say so explicitly.
             */
            shouldTryCommandAgain = false;
            try {
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.