public final class Handshake
extends java.lang.Object
This value object describes a completed handshake. Use ConnectionSpec
to set policy
for new handshakes.
Modifier and Type | Field and Description |
---|---|
private CipherSuite |
cipherSuite |
private java.util.List<java.security.cert.Certificate> |
localCertificates |
private java.util.List<java.security.cert.Certificate> |
peerCertificates |
private TlsVersion |
tlsVersion |
Modifier | Constructor and Description |
---|---|
private |
Handshake(TlsVersion tlsVersion,
CipherSuite cipherSuite,
java.util.List<java.security.cert.Certificate> peerCertificates,
java.util.List<java.security.cert.Certificate> localCertificates) |
Modifier and Type | Method and Description |
---|---|
CipherSuite |
cipherSuite()
Returns the cipher suite used for the connection.
|
boolean |
equals(java.lang.Object other) |
static Handshake |
get(javax.net.ssl.SSLSession session) |
static Handshake |
get(TlsVersion tlsVersion,
CipherSuite cipherSuite,
java.util.List<java.security.cert.Certificate> peerCertificates,
java.util.List<java.security.cert.Certificate> localCertificates) |
int |
hashCode() |
java.util.List<java.security.cert.Certificate> |
localCertificates()
Returns a possibly-empty list of certificates that identify this peer.
|
java.security.Principal |
localPrincipal()
Returns the local principle, or null if this peer is anonymous.
|
private java.util.List<java.lang.String> |
names(java.util.List<java.security.cert.Certificate> certificates) |
java.util.List<java.security.cert.Certificate> |
peerCertificates()
Returns a possibly-empty list of certificates that identify the remote peer.
|
java.security.Principal |
peerPrincipal()
Returns the remote peer's principle, or null if that peer is anonymous.
|
TlsVersion |
tlsVersion()
Returns the TLS version used for this connection.
|
java.lang.String |
toString() |
private final TlsVersion tlsVersion
private final CipherSuite cipherSuite
private final java.util.List<java.security.cert.Certificate> peerCertificates
private final java.util.List<java.security.cert.Certificate> localCertificates
private Handshake(TlsVersion tlsVersion, CipherSuite cipherSuite, java.util.List<java.security.cert.Certificate> peerCertificates, java.util.List<java.security.cert.Certificate> localCertificates)
public static Handshake get(javax.net.ssl.SSLSession session) throws java.io.IOException
java.io.IOException
public static Handshake get(TlsVersion tlsVersion, CipherSuite cipherSuite, java.util.List<java.security.cert.Certificate> peerCertificates, java.util.List<java.security.cert.Certificate> localCertificates)
public TlsVersion tlsVersion()
TlsVersion.SSL_3_0
.public CipherSuite cipherSuite()
public java.util.List<java.security.cert.Certificate> peerCertificates()
@Nullable public java.security.Principal peerPrincipal()
public java.util.List<java.security.cert.Certificate> localCertificates()
@Nullable public java.security.Principal localPrincipal()
public boolean equals(@Nullable java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
private java.util.List<java.lang.String> names(java.util.List<java.security.cert.Certificate> certificates)