Examples of HTTPSProperties


Examples of com.dotcms.repackage.com.sun.jersey.client.urlconnection.HTTPSProperties

      List<Environment> environments = APILocator.getEnvironmentAPI().findEnvironmentsByBundleId(config.getId());

      ClientConfig cc = new DefaultClientConfig();

      if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
        cc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
            }
      Client client = Client.create(cc);

      //Updating audit table
      currentStatusHistory = pubAuditAPI.getPublishAuditStatus(config.getId()).getStatusPojo();
View Full Code Here

Examples of com.dotcms.repackage.com.sun.jersey.client.urlconnection.HTTPSProperties

    ClientConfig clientConfig = new DefaultClientConfig();
    TrustFactory tFactory = new TrustFactory();

    if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
        clientConfig.getProperties()
        .put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
    }
        Client client = Client.create(clientConfig);
        WebResource webResource;

        List<PublishAuditStatus> pendingAudits = pubAuditAPI.getPendingPublishAuditStatus();
View Full Code Here

Examples of com.dotcms.repackage.com.sun.jersey.client.urlconnection.HTTPSProperties

    private Client getRESTClient() {
        TrustFactory tFactory = new TrustFactory();
        ClientConfig cc = new DefaultClientConfig();

        if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
            cc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
        }
        final Client client = Client.create(cc);
        return client;
    }
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

                new KeyManager[]{KeyManagerUtils.createClientKeyManager(new File(keyStoreFile), password)},
                new TrustManager[] {TrustManagerUtils.getValidateServerCertificateTrustManager()},
                new SecureRandom());
        DefaultClientConfig config = new DefaultClientConfig();
        config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
                new HTTPSProperties(new AllowAllHostnameVerifier(), sslContext));
        LOG.info("Configuring client with " + new File(keyStoreFile).getAbsolutePath());
        return Client.create(config);
    }
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

            }
            this.clientProperties = properties;
            SSLContext sslContext = getSslContext();
            DefaultClientConfig config = new DefaultClientConfig();
            config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
                    new HTTPSProperties(ALL_TRUSTING_HOSTNAME_VERIFIER, sslContext)
            );
            Client client = Client.create(config);
            client.setConnectTimeout(Integer.parseInt(clientProperties.getProperty("falcon.connect.timeout",
                    "180000")));
            client.setReadTimeout(Integer.parseInt(clientProperties.getProperty("falcon.read.timeout", "180000")));
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

                    null,
                    new TrustManager[]{TrustManagerUtils.getValidateServerCertificateTrustManager()},
                    new SecureRandom());
            DefaultClientConfig config = new DefaultClientConfig();
            config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
                    new HTTPSProperties(new HostnameVerifier() {
                        @Override
                        public boolean verify(String hostname, SSLSession sslSession) {
                            return true;
                        }
                    }, sslContext));
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

            client = JERSEY_CLIENT;
        }
        try{
            Habitat habitat = SecurityServicesUtil.getInstance().getHabitat();
            SecureAdmin secureAdmin = habitat.getComponent(SecureAdmin.class);
            HTTPSProperties httpsProperties = new HTTPSProperties(new BasicHostnameVerifier(),
                habitat.getComponent(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null ));
            client.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, httpsProperties);
        }catch(Exception ex){
            GuiUtil.getLogger().warning("RestUtil.initialize() failed");
            if (GuiUtil.getLogger().isLoggable(Level.FINE)){
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

      SSLContext sc = SSLContext.getInstance("TLS");
      sc.init(null, trustAllCerts, new SecureRandom());

      //Install all trusting cert SSL context for jersey client
      ClientConfig config = new DefaultClientConfig();
      config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(
        new HostnameVerifier() {
          @Override
          public boolean verify( String s, SSLSession sslSession ) {
            return true;
          }
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

        } catch (KeyManagementException kme) {

        }

        HTTPSProperties prop = new HTTPSProperties(null, context);

        DefaultClientConfig dcc = new DefaultClientConfig();
        dcc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, prop);

        Client c = Client.create(dcc);
View Full Code Here

Examples of com.sun.jersey.client.urlconnection.HTTPSProperties

            System.out.println("KeyManagementException happened " + kme.getMessage());

        }


        HTTPSProperties prop = new HTTPSProperties(null, context);

        DefaultClientConfig dcc = new DefaultClientConfig();
        dcc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, prop);

        Client c = Client.create(dcc);
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.