Package javax.net.ssl

Examples of javax.net.ssl.HttpsURLConnection.connect()


            // perform the interaction between the peers and check the results
            SSLSocket peerSocket = (SSLSocket) doInteraction(connection, ss);
            checkConnectionStateParameters(connection, peerSocket);

            // should silently exit
            connection.connect();
        } finally {
            // roll the properties back to system values
            tearDownStoreProperties();
        }
    }
View Full Code Here


            SSLSocket peerSocket = (SSLSocket) doPersistentInteraction(
                    connection, ss);
            checkConnectionStateParameters(connection, peerSocket);

            // should silently exit
            connection.connect();
        } finally {
            // roll the properties back to system values
            tearDownStoreProperties();
        }
    }
View Full Code Here

            // perform the interaction between the peers and check the results
            SSLSocket peerSocket = (SSLSocket) doInteraction(connection, ss);
            checkConnectionStateParameters(connection, peerSocket);

            // should silently exit
            connection.connect();
        } finally {
            // roll the properties back to system values
            tearDownStoreProperties();
        }
    }
View Full Code Here

    Set<String> hostsList = hostsReader.getHosts();
    for (String hostname : hostsList) {
      HttpsURLConnection connection = null;
      try {
        connection = openConnection(hostname, sslPort, path);
        connection.connect();
        if (LOG.isDebugEnabled()) {
          StringBuffer sb = new StringBuffer();
          X509Certificate[] clientCerts = (X509Certificate[]) connection
              .getLocalCertificates();
          if (clientCerts != null) {
View Full Code Here

  static void checkServerCertsExpirationDays(Configuration conf,
      String hostname, int port) throws IOException {
    setupSslProps(conf);
    HttpsURLConnection connection = null;
    connection = openConnection(hostname, port, null);
    connection.connect();
    X509Certificate[] serverCerts = (X509Certificate[]) connection
        .getServerCertificates();
    Date curDate = new Date();
    long curTime = curDate.getTime();
    if (serverCerts != null) {
View Full Code Here

            public boolean verify(String hostname, SSLSession session) {
                return true;
            }}
        );

        conn.connect();
        read(conn.getInputStream());
       
        service.stop();
        assertTrue(servlet.invoked);
View Full Code Here

        nnUri.getPort(), path + '?' + query);
    HttpsURLConnection conn = (HttpsURLConnection)URLUtils.openConnection(url);
    // bypass hostname verification
    conn.setHostnameVerifier(new DummyHostnameVerifier());
    conn.setRequestMethod("GET");
    conn.connect();

    // check cert expiration date
    final int warnDays = ExpWarnDays;
    if (warnDays > 0) { // make sure only check once
      ExpWarnDays = 0;
View Full Code Here

                System.out.println("Connecting to post registration data at " + url);
            }

            con.setRequestMethod("POST");
            con.setRequestProperty("Content-Type", "text/xml;charset=\"utf-8\"");
            con.connect();
           
            OutputStream out = con.getOutputStream();
            registration.storeToXML(out);
            out.flush();
            out.close();
View Full Code Here

    HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
    // bypass hostname verification
    try {
      conn.setHostnameVerifier(new DummyHostnameVerifier());
      conn.setRequestMethod("GET");
      conn.connect();
    } catch (IOException ioe) {
      throwIOExceptionFromConnection(conn, ioe);
    }

    // check cert expiration date
View Full Code Here

        nnUri.getPort(), path + '?' + query);
    HttpsURLConnection conn = (HttpsURLConnection)URLUtils.openConnection(url);
    // bypass hostname verification
    conn.setHostnameVerifier(new DummyHostnameVerifier());
    conn.setRequestMethod("GET");
    conn.connect();

    // check cert expiration date
    final int warnDays = ExpWarnDays;
    if (warnDays > 0) { // make sure only check once
      ExpWarnDays = 0;
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.