| Method from javax.net.ssl.HttpsURLConnection Detail: |
abstract public String getCipherSuite()
Returns the name of the cipher suite negotiated during the SSL handshake. |
public static HostnameVerifier getDefaultHostnameVerifier() {
return defaultHostnameVerifier;
}
Returns the default hostname verifier. |
public static SSLSocketFactory getDefaultSSLSocketFactory() {
return defaultSSLSocketFactory;
}
Returns the default SSL socket factory for new instances. |
public HostnameVerifier getHostnameVerifier() {
return hostnameVerifier;
}
Returns the hostname verifier used by this instance. |
abstract public Certificate[] getLocalCertificates()
Returns the list of local certificates used during the handshake. These
certificates were sent to the peer. |
public Principal getLocalPrincipal() {
Certificate[] certs = getLocalCertificates();
if (certs == null || certs.length == 0 || (!(certs[0] instanceof X509Certificate))) {
return null;
}
return ((X509Certificate) certs[0]).getSubjectX500Principal();
}
Returns the {@code Principal} used to identify the local host during the handshake. |
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
Certificate[] certs = getServerCertificates();
if (certs == null || certs.length == 0 || (!(certs[0] instanceof X509Certificate))) {
throw new SSLPeerUnverifiedException("No server's end-entity certificate");
}
return ((X509Certificate) certs[0]).getSubjectX500Principal();
}
Returns the {@code Principal} identifying the peer. |
public SSLSocketFactory getSSLSocketFactory() {
return sslSocketFactory;
}
Returns the SSL socket factory used by this instance. |
abstract public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException
Return the list of certificates identifying the peer during the
handshake. |
public static void setDefaultHostnameVerifier(HostnameVerifier v) {
if (v == null) {
throw new IllegalArgumentException("HostnameVerifier is null");
}
defaultHostnameVerifier = v;
}
Sets the default hostname verifier to be used by new instances. |
public static void setDefaultSSLSocketFactory(SSLSocketFactory sf) {
if (sf == null) {
throw new IllegalArgumentException("SSLSocketFactory is null");
}
defaultSSLSocketFactory = sf;
}
Sets the default SSL socket factory to be used by new instances. |
public void setHostnameVerifier(HostnameVerifier v) {
if (v == null) {
throw new IllegalArgumentException("HostnameVerifier is null");
}
hostnameVerifier = v;
}
Sets the hostname verifier for this instance. |
public void setSSLSocketFactory(SSLSocketFactory sf) {
if (sf == null) {
throw new IllegalArgumentException("SSLSocketFactory is null");
}
sslSocketFactory = sf;
}
Sets the SSL socket factory for this instance. |