Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

HandshakeCompletedEvent

extends EventObject
java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.net.ssl.HandshakeCompletedEvent

Class Overview

The event object encapsulating the information about a completed SSL handshake on a SSL connection.

Summary

[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
HandshakeCompletedEvent ( SSLSocket sock, SSLSession s)
Creates a new HandshakeCompletedEvent with the specified SSL socket and SSL session.
Public Methods
String getCipherSuite ()
Returns the name of the cipher suite negotiated during this handshake.
Certificate[] getLocalCertificates ()
Returns the list of local certificates used during the handshake.
Principal getLocalPrincipal ()
Returns the Principal used to identify during the handshake.
X509Certificate[] getPeerCertificateChain ()
Returns the list of certificates identifying the peer.
Certificate[] getPeerCertificates ()
Return the list of certificates identifying the peer during the handshake.
Principal getPeerPrincipal ()
Returns the Principal identifying the peer.
SSLSession getSession ()
Returns the SSL session associated with this event.
SSLSocket getSocket ()
Returns the SSL socket that produced this event.
[Expand]
Inherited Methods
From class java.util.EventObject
From class java.lang.Object

Public Constructors

public HandshakeCompletedEvent ( SSLSocket sock, SSLSession s)

Added in API level 1

Creates a new HandshakeCompletedEvent with the specified SSL socket and SSL session.

Parameters
sock the SSL socket.
s the SSL session.

Public Methods

public String getCipherSuite ()

Added in API level 1

Returns the name of the cipher suite negotiated during this handshake.

Returns
  • the name of the cipher suite negotiated during this handshake.

public Certificate[] getLocalCertificates ()

Added in API level 1

Returns the list of local certificates used during the handshake. These certificates were sent to the peer.

Returns
  • Returns the list of certificates used during the handshake with the local identity certificate followed by CAs, or null if no certificates were used during the handshake.

public Principal getLocalPrincipal ()

Added in API level 1

Returns the Principal used to identify during the handshake.

Returns
  • the Principal used to identify during the handshake.

public X509Certificate[] getPeerCertificateChain ()

Added in API level 1

Returns the list of certificates identifying the peer. The peer's identity certificate is followed by the validated certificate authority certificates.

Replaced by: getPeerCertificates()

Returns
  • the list of certificates identifying the peer
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

public Certificate[] getPeerCertificates ()

Added in API level 1

Return the list of certificates identifying the peer during the handshake.

Returns
  • the list of certificates identifying the peer with the peer's identity certificate followed by CAs.
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

public Principal getPeerPrincipal ()

Added in API level 1

Returns the Principal identifying the peer.

Returns
  • the Principal identifying the peer.
Throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.

public SSLSession getSession ()

Added in API level 1

Returns the SSL session associated with this event.

Returns
  • the SSL session associated with this event.

public SSLSocket getSocket ()

Added in API level 1

Returns the SSL socket that produced this event.

Returns
  • the SSL socket that produced this event.