HttpsURLConnection getLocalCertificates - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for HttpsURLConnection getLocalCertificates method.

This code example shows how to use the following methods:getCipherSuite, getLocalCertificates, getLocalPrincipal, getPeerPrincipal, getServerCertificates
This code example shows how to use the following methods:setDoOutput, getCipherSuite, getLocalCertificates, getLocalPrincipal, getPeerPrincipal
            URL url = new URL("https://requested.host:55554/requested.data");
            HttpsURLConnection connection = (HttpsURLConnection) url
                    .openConnection(new Proxy(Proxy.Type.HTTP,
                            new InetSocketAddress("localhost", ss
                                    .getLocalPort())));
            connection.setDoOutput(true);
 
            // perform the interaction between the peers and check the results 
            SSLSocket peerSocket = (SSLSocket) doInteraction(connection, ss,
                    OK_CODE);
            checkConnectionStateParameters(connection, peerSocket);
        } finally { 
            // roll the properties back to system values 
            tearDownStoreProperties(); 
        } 
    } 
 
    /** 
     * Tests HTTPS connection process made through the proxy server. Proxy 
     * server needs authentication but client fails to authenticate 

4
CodeRank
This code example shows how to use the following methods:getLocalCertificates
		return realConnection.getHostnameVerifier();
	} 
	 
	public Certificate[] getLocalCertificates()
	{ 
		return realConnection.getLocalCertificates();
	} 
	 
	public Principal getLocalPrincipal()
	{ 
		return realConnection.getLocalPrincipal();
	} 
	 
	public Principal getPeerPrincipal() throws SSLPeerUnverifiedException
	{ 
		return realConnection.getPeerPrincipal();
	} 
	 
	public SSLSocketFactory getSSLSocketFactory()
	{ 
4
CodeRank
getLocalCertificates Method Overview
Returns the list of local certificates used during the handshake.
See Code Examples for other Java 8 HttpsURLConnection Methods: