Package org.apache.http.conn.ssl

Examples of org.apache.http.conn.ssl.X509HostnameVerifier


    if (sslConfiguration != null) {
      SchemeSocketFactory schemeSocketFactory;
      try {
        javax.net.ssl.SSLSocketFactory sslSocketFactory = sslConfiguration.getSslSocketFactory();

        X509HostnameVerifier apacheHostnameVerifier = null;
        if (sslConfiguration.getHostnameVerifier() != null) {
          apacheHostnameVerifier = new ApacheHostnameVerifierAdapter(sslConfiguration.getHostnameVerifier());
        } else {
          apacheHostnameVerifier = new ApacheHostnameVerifierAdapter(
              SSLSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
View Full Code Here


    SchemeSocketFactory schemeSocketFactory;
    try {
      KeyManager keyManager = new SimpleClientCertificateKeyManager(certificateAndKey);

      TrustManager trustManager;
      X509HostnameVerifier hostnameVerifier;
      if (trustKeys != null) {
        trustManager = new PublicKeyTrustManager(trustKeys);
        hostnameVerifier = SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;
      } else {
        trustManager = null;
View Full Code Here

        HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContextRef", HttpContext.class);
        if (httpContext == null) {
            httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
        }

        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = getX509HostnameVerifier();
        }

        // TODO cmueller: remove the "sslContextParametersRef" look up in Camel 3.0
View Full Code Here

        HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContextRef", HttpContext.class);
        if (httpContext == null) {
            httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
        }

        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = getX509HostnameVerifier();
        }

        // TODO cmueller: remove the "sslContextParametersRef" look up in Camel 3.0
View Full Code Here

        HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContextRef", HttpContext.class);
        if (httpContext == null) {
            httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
        }

        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = getX509HostnameVerifier();
        }
       
View Full Code Here

        if (!"https".equalsIgnoreCase(targetURL.getProtocol())) {
            return;
        }

        final TrustStrategy trustStrategy = httpsCertTrustStrategy.getStrategy();
        final X509HostnameVerifier hostnameVerifier = httpsHostnameVerifyStrategy.getVerifier();
        final SSLSocketFactory socketFactory = new SSLSocketFactory(trustStrategy, hostnameVerifier);
        final Scheme sch = new Scheme("https", 443, socketFactory);
        httpclient.getConnectionManager().getSchemeRegistry().register(sch);
    }
View Full Code Here

        HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContextRef", HttpContext.class);
        if (httpContext == null) {
            httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
        }

        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = getX509HostnameVerifier();
        }
       
        SSLContextParameters sslContextParameters = resolveAndRemoveReferenceParameter(parameters, "sslContextParametersRef", SSLContextParameters.class);
View Full Code Here

        HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContextRef", HttpContext.class);
        if (httpContext == null) {
            httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
        }

        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = getX509HostnameVerifier();
        }

        // TODO cmueller: remove the "sslContextParametersRef" look up in Camel 3.0
View Full Code Here

            ctx.init(null, new TrustManager[]{tm}, null);
            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
           
            // When Apache Client AllowAllHostnameVerifier is strict, this should be used
            // Stays here for reference
            X509HostnameVerifier verifier = new X509HostnameVerifier() {
                @Override
        public boolean verify(String s, SSLSession sslSession) {
                    return true;
                }
                @Override
View Full Code Here

        HttpClientConfigurer httpClientConfigurer = resolveAndRemoveReferenceParameter(parameters, "httpClientConfigurerRef", HttpClientConfigurer.class);
        if (httpClientConfigurer == null) {
            httpClientConfigurer = resolveAndRemoveReferenceParameter(parameters, "httpClientConfigurer", HttpClientConfigurer.class);
        }
       
        X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters, "x509HostnameVerifier", X509HostnameVerifier.class);
        if (x509HostnameVerifier == null) {
            x509HostnameVerifier = this.x509HostnameVerifier;
        }
       
        // create the configurer to use for this endpoint
View Full Code Here

TOP

Related Classes of org.apache.http.conn.ssl.X509HostnameVerifier

Copyright © 2018 www.massapicom. 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.