Examples of TLSClientParameters


Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

            final AsyncSchemeRegistry reg = new AsyncSchemeRegistry();
            reg.register(new AsyncScheme("http", 80, null));
            if ("https".equals(url.getScheme())) {
                try {
                    // check tlsClientParameters from message header
                    TLSClientParameters tlsClientParameters = outMessage.get(TLSClientParameters.class);
                    if (tlsClientParameters == null) {
                        tlsClientParameters = getTlsClientParameters();
                    }
                    if (tlsClientParameters == null) {
                        tlsClientParameters = new TLSClientParameters();
                    }

                    final SSLContext sslcontext = getSSLContext(tlsClientParameters);
                    reg.register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslcontext) {
                        @Override
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

        sslState = null;
        return ctx;
    }

    public void initializeSSLEngine(SSLContext sslcontext, SSLEngine sslengine) {
        TLSClientParameters tlsClientParameters = getTlsClientParameters();
        if (tlsClientParameters == null) {
            tlsClientParameters = new TLSClientParameters();
        }
        String[] cipherSuites = SSLUtils.getCiphersuites(tlsClientParameters.getCipherSuites(),
                                                         SSLUtils.getSupportedCipherSuites(sslcontext),
                                                         tlsClientParameters.getCipherSuitesFilter(), LOG, false);
        sslengine.setEnabledCipherSuites(cipherSuites);
    }
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

        HTTPConduit conduit = new URLConnectionHTTPConduit(bus, ei, null);
        conduit.finalizeConfig();
   
        Message message = getNewMessage();
        // We need an SSL policy, or we can't use "https".
        conduit.setTlsClientParameters(new TLSClientParameters());
       
        // Test call
        conduit.prepare(message);
       
        return message.get("http.connection");
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

                                   ? url.openConnection(proxy)
                                   : url.openConnection());
        if (HTTPS_URL_PROTOCOL_ID.equals(url.getProtocol())) {
           
            if (tlsClientParameters == null) {
                tlsClientParameters = new TLSClientParameters();
            }

            Exception ex = null;
            try {
                decorateWithTLS(tlsClientParameters, connection);
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

        }
        if (address == null) {
            useHttps = configuredConduit.getTlsClientParameters() != null;
        }
        if (useHttps) {
            TLSClientParameters params = configuredConduit.getTlsClientParameters();
            if (params == null) {
                params = new TLSClientParameters(); //use defaults
            }
            fac = new HttpsURLConnectionFactory(params);
        } else {
            fac = new HttpURLConnectionFactoryImpl();
        }
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = http.getClient();
        assertEquals("the httpClientPolicy's autoRedirect should be true",
                     true, httpClientPolicy.isAutoRedirect());
        TLSClientParameters tlsParameters = http.getTlsClientParameters();
        assertNotNull("the http conduit's tlsParameters should not be null", tlsParameters);
       
       
        // If we set any name, but Edward, Mary, or George,
        // and a password of "password" we will get through
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

            //ignore, just use info based on Tls
        }
        if (useHttps
            || configuredConduit.getTlsClientParameters() != null) {
           
            TLSClientParameters params = configuredConduit.getTlsClientParameters();
            if (params == null) {
                params = new TLSClientParameters(); //use defaults
            }
            fac = new HttpsURLConnectionFactory(params);
        } else {
            fac = new HttpURLConnectionFactoryImpl();
        }
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = http.getClient();
        assertEquals("the httpClientPolicy's autoRedirect should be true",
                     true, httpClientPolicy.isAutoRedirect());
        TLSClientParameters tlsParaments = http.getTlsClientParameters();
        assertNotNull("the http conduite's tlsParaments should not be null", tlsParaments);
       
       
        // If we set any name, but Edward, Mary, or George,
        // and a password of "password" we will get through
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

            pf.setUserProviders(providers);
            pf.setDynamicConfiguration(getConfiguration());
            WebClient.getConfig(targetClient).getRequestContext().putAll(getConfiguration().getProperties());
            WebClient.getConfig(targetClient).getRequestContext().put(Client.class.getName(), ClientImpl.this);
            // TLS
            TLSClientParameters tlsParams = secConfig.getTlsClientParams();
            if (tlsParams.getSSLSocketFactory() != null
                || tlsParams.getTrustManagers() != null) {
                WebClient.getConfig(targetClient).getHttpConduit().setTlsClientParameters(tlsParams);
            }
           
            // start building the invocation
            return new InvocationBuilderImpl(WebClient.fromClient(targetClient));
View Full Code Here

Examples of org.apache.cxf.configuration.jsse.TLSClientParameters

    static TLSClientParameters createTLSClientParametersFromType(TLSClientParametersType params)
        throws GeneralSecurityException,
               IOException {

        TLSClientParameters ret = new TLSClientParameters();
        if (params.isDisableCNCheck()) {
            ret.setDisableCNCheck(true);
        }
        if (params.isSetCipherSuitesFilter()) {
            ret.setCipherSuitesFilter(params.getCipherSuitesFilter());
        }
        if (params.isSetCipherSuites()) {
            ret.setCipherSuites(params.getCipherSuites().getCipherSuite());
        }
        if (params.isSetJsseProvider()) {
            ret.setJsseProvider(params.getJsseProvider());
        }
        if (params.isSetSecureRandomParameters()) {
            ret.setSecureRandom(
                TLSParameterJaxBUtils.getSecureRandom(
                        params.getSecureRandomParameters()));
        }
        if (params.isSetKeyManagers()) {
            ret.setKeyManagers(
                TLSParameterJaxBUtils.getKeyManagers(params.getKeyManagers()));
        }
        if (params.isSetTrustManagers()) {
            ret.setTrustManagers(
                TLSParameterJaxBUtils.getTrustManagers(
                        params.getTrustManagers()));
        }
        if (params.isSetCertConstraints()) {
            ret.setCertConstraints(params.getCertConstraints());
        }
        return ret;
    }
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.