Class Handshake

java.lang.Object
org.miaixz.bus.http.socket.Handshake

public class Handshake extends Object
TLS握手的记录。对于HTTPS客户机,客户机是local,远程服务器 此值对象描述完成的握手。使用ConnectionSuite设置新的握手策略
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • get

      public static Handshake get(SSLSession session) throws IOException
      Throws:
      IOException
    • get

      public static Handshake get(org.miaixz.bus.core.net.tls.TlsVersion tlsVersion, CipherSuite cipherSuite, List<Certificate> peerCertificates, List<Certificate> localCertificates)
    • tlsVersion

      public org.miaixz.bus.core.net.tls.TlsVersion tlsVersion()
      Returns the TLS version used for this connection. This value wasn't tracked prior to Http 3.0. For responses cached by preceding versions this returns TlsVersion.SSLv3.
    • 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)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object