Handshake

class Handshake

A record of a TLS handshake. For HTTPS clients, the client is local and the remote server is its peer.

This value object describes a completed handshake. Use ConnectionSpec to set policy for new handshakes.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:JvmName(name = "cipherSuite")
val cipherSuite: CipherSuite

Returns the cipher suite used for the connection.

Link copied to clipboard
@get:JvmName(name = "localCertificates")
val localCertificates: List<Certificate>

Returns a possibly-empty list of certificates that identify this peer.

Link copied to clipboard
@get:JvmName(name = "localPrincipal")
val localPrincipal: Principal?

Returns the local principle, or null if this peer is anonymous.

Link copied to clipboard
@get:JvmName(name = "peerCertificates")
val peerCertificates: List<Certificate>

Returns a possibly-empty list of certificates that identify the remote peer.

Link copied to clipboard
@get:JvmName(name = "peerPrincipal")
val peerPrincipal: Principal?

Returns the remote peer's principle, or null if that peer is anonymous.

Link copied to clipboard
@get:JvmName(name = "tlsVersion")
val tlsVersion: TlsVersion

Returns the TLS version used for this connection. This value wasn't tracked prior to OkHttp 3.0. For responses cached by preceding versions this returns TlsVersion.SSL_3_0.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String