The source of this event is the SSLSocket on which handshaking just completed.
SSLSocket, HandshakeCompletedListener, SSLSession
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final transient SSLSession |
| Access | Constructor and Description |
|---|---|
| public | HandshakeCompletedEvent(SSLSocket
the SSLSocket acting as the source of the event sock, SSLSession the SSLSession this event is associated with s)Constructs a new HandshakeCompletedEvent. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the name of the cipher suite negotiated during this session.Returns the cipher suite in use by the session which was produced by the handshake. |
| public Certificate[] | Returns: an ordered array of certificates, with the local certificate first followed by any certificate authorities. If no certificates were sent, then null is returned.Returns the certificate(s) that were sent to the peer during handshaking. |
| public Principal | Returns: the principal sent to the peer. Returns an X500Principal of the end-entity certificate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites. If no principal was sent, then null is returned.Returns the principal that was sent to the peer during handshaking. |
| public X509Certificate[] | Returns: an ordered array of peer X.509 certificates, with the peer's own certificate first followed by any certificate authorities. (The certificates are in the original JSSEjavax. format).
Deprecated
for removal since 9. The
getPeerCertificates() method that returns an
array of java.security.cert.Certificate should
be used instead.
Returns the identity of the peer which was identified as part of defining the session. |
| public Certificate[] | Returns: an ordered array of the peer certificates, with the peer's own certificate first followed by any certificate authorities.Returns the identity of the peer which was established as part of defining the session. |
| public Principal | Returns: the peer's principal. Returns an X500Principal of the end-entity certificate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites.Returns the identity of the peer which was established as part of defining the session. |
| public SSLSession | Returns: theSSLSession for this handshakeReturns the session that triggered this event. |
| public SSLSocket | Returns: the socket on which the connection was made.Returns the socket which is the source of this event. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| session | back to summary |
|---|---|
| private final transient SSLSession session | |
| HandshakeCompletedEvent | back to summary |
|---|---|
| public HandshakeCompletedEvent(SSLSocket sock, SSLSession s) Constructs a new HandshakeCompletedEvent.
| |
| getCipherSuite | back to summary |
|---|---|
| public String getCipherSuite() Returns the cipher suite in use by the session which was produced by the handshake. (This is a convenience method for getting the ciphersuite from the SSLsession.)
| |
| getLocalCertificates | back to summary |
|---|---|
| public Certificate[] getLocalCertificates() Returns the certificate(s) that were sent to the peer during handshaking. Note This method is useful only when using certificate-based cipher suites. When multiple certificates are available for use in a handshake, the implementation chooses what it considers the "best" certificate chain available, and transmits that to the other side. This method allows the caller to know which certificate chain was actually used.
| |
| getLocalPrincipal | back to summary |
|---|---|
| public Principal getLocalPrincipal() Returns the principal that was sent to the peer during handshaking.
| |
| getPeerCertificateChain | back to summary |
|---|---|
| public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException
Deprecated for removal since 9. The Returns the identity of the peer which was identified as part of defining the session. Note This method can be used only when using certificate-based cipher suites; using it with non-certificate-based cipher suites, such as Kerberos, will throw an SSLPeerUnverifiedException. Note The returned value may not be a valid certificate chain and should not be relied on for trust decisions. Note this method exists for compatibility with previous
releases. New applications should use
| |
| getPeerCertificates | back to summary |
|---|---|
| public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException Returns the identity of the peer which was established as part of defining the session. Note This method can be used only when using certificate-based cipher suites; using it with non-certificate-based cipher suites, such as Kerberos, will throw an SSLPeerUnverifiedException. Note The returned value may not be a valid certificate chain and should not be relied on for trust decisions.
| |
| getPeerPrincipal | back to summary |
|---|---|
| public Principal getPeerPrincipal() throws SSLPeerUnverifiedException Returns the identity of the peer which was established as part of defining the session.
| |
| getSession | back to summary |
|---|---|
| public SSLSession getSession() Returns the session that triggered this event.
| |
| getSocket | back to summary |
|---|---|
| public SSLSocket getSocket() Returns the socket which is the source of this event. (This is a convenience function, to let applications write code without type casts.)
| |