Name
HandshakeCompletedEvent
Synopsis
An instance of this class is passed to the
handshakeCompleted( )
method of any registered
HandshakeCompletedListener
objects by an
SSLSocket
when that socket completes the handshake
phase of establishing a connection. The various methods of a
HandshakeCompletedEvent
return information (such
as the name of the cipher suite in use and the
certificate chain of the remote host) that was determined during that
handshake.
Note that the getPeerCertificateChain(
)
method returns an object from the
javax.security.cert
package, which is not
documented in this book. The method and package exist only for
backward compatibility with earlier versions of the JSSE API, and
should be considered deprecated. Use getPeerCertificates(
)
, which uses
java.security.cert
instead.
Figure 18-2. javax.net.ssl.HandshakeCompletedEvent
public class HandshakeCompletedEvent extends java.util.EventObject { // Public Constructors public HandshakeCompletedEvent(SSLSocket sock, SSLSession s); // Public Instance Methods public String getCipherSuite( ); public java.security.cert.Certificate[ ] getLocalCertificates( ); 5.0 public java.security.Principal getLocalPrincipal( ); public javax.security.cert.X509Certificate[ ] getPeerCertificateChain( ) throws SSLPeerUnverifiedException; public java.security.cert.Certificate[ ] getPeerCertificates( ) throws SSLPeerUnverifiedException; 5.0 public ...
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.