Class Handshake



  • public final class Handshake
    extends Object
    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.

    • Method Detail

      • tlsVersion

        public TlsVersion tlsVersion()
        Returns the TLS version used for this connection. May return null if the response was cached with a version of OkHttp prior to 3.0.
      • cipherSuite

        public CipherSuite cipherSuite()
        Returns the cipher suite used for the connection.
      • peerCertificates

        public List<Certificate> peerCertificates()
        Returns a possibly-empty list of certificates that identify the remote peer.
      • peerPrincipal

        public Principal peerPrincipal()
        Returns the remote peer's principle, or null if that peer is anonymous.
      • localCertificates

        public List<Certificate> localCertificates()
        Returns a possibly-empty list of certificates that identify this peer.
      • localPrincipal

        public Principal localPrincipal()
        Returns the local principle, or null if this peer is anonymous.
      • equals

        public boolean equals(Object other)
      • hashCode

        public int hashCode()