okhttp / okhttp3 / Handshake

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.

Properties

cipherSuite

val cipherSuite: CipherSuite

Returns the cipher suite used for the connection.

localCertificates

val localCertificates: List<Certificate>

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

localPrincipal

val localPrincipal: Principal?

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

peerCertificates

val peerCertificates: List<Certificate>

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

peerPrincipal

val peerPrincipal: Principal?

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

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

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Companion Object Functions

get

fun get(tlsVersion: TlsVersion, cipherSuite: CipherSuite, peerCertificates: List<Certificate>, localCertificates: List<Certificate>): Handshake

handshake

fun SSLSession.handshake(): Handshake