Methods Summary |
---|
public abstract java.lang.String | getCipherSuite()Returns the name of the cipher suite negotiated during the SSL handshake.
|
public static javax.net.ssl.HostnameVerifier | getDefaultHostnameVerifier()Returns the default hostname verifier.
return defaultHostnameVerifier;
|
public static javax.net.ssl.SSLSocketFactory | getDefaultSSLSocketFactory()Returns the default SSL socket factory for new instances.
return defaultSSLSocketFactory;
|
public javax.net.ssl.HostnameVerifier | getHostnameVerifier()Returns the hostname verifier used by this instance.
return hostnameVerifier;
|
public abstract java.security.cert.Certificate[] | getLocalCertificates()Returns the list of local certificates used during the handshake. These
certificates were sent to the peer.
|
public java.security.Principal | getLocalPrincipal()Returns the {@code Principal} used to identify the local host during the handshake.
Certificate[] certs = getLocalCertificates();
if (certs == null || certs.length == 0
|| (!(certs[0] instanceof X509Certificate))) {
return null;
}
return ((X509Certificate) certs[0]).getSubjectX500Principal();
|
public java.security.Principal | getPeerPrincipal()Returns the {@code Principal} identifying the peer.
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();
|
public javax.net.ssl.SSLSocketFactory | getSSLSocketFactory()Returns the SSL socket factory used by this instance.
return socketFactory;
|
public abstract java.security.cert.Certificate[] | getServerCertificates()Return the list of certificates identifying the peer during the
handshake.
|
public static void | setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier v)Sets the default hostname verifier to be used by new instances.
if (v == null) {
throw new IllegalArgumentException("HostnameVerifier is null");
}
defaultHostnameVerifier = v;
|
public static void | setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory sf)Sets the default SSL socket factory to be used by new instances.
if (sf == null) {
throw new IllegalArgumentException("SSLSocketFactory is null");
}
defaultSSLSocketFactory = sf;
|
public void | setHostnameVerifier(javax.net.ssl.HostnameVerifier v)Sets the hostname verifier for this instance.
if (v == null) {
throw new IllegalArgumentException("HostnameVerifier is null");
}
hostnameVerifier = v;
|
public void | setSSLSocketFactory(javax.net.ssl.SSLSocketFactory sf)Sets the SSL socket factory for this instance.
if (sf == null) {
throw new IllegalArgumentException("SSLSocketFactory is null");
}
socketFactory = sf;
|