Record Class ClientHelloInfo

java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.tls.ClientHelloInfo
Record Components:
serverName - the host name from server_name (SNI), lower case without a trailing dot, or null if the client sent none
alpnProtocols - the application protocols the client offered, in its order of preference; each protocol's bytes are mapped one to one onto characters (ISO-8859-1)
signatureSchemes - the client's signature_algorithms that can sign a TLS 1.3 CertificateVerify, in its order of preference
cipherSuites - the client's cipher suites, in its order of preference
groups - the client's supported_groups, in its order of preference

public record ClientHelloInfo(String serverName, List<String> alpnProtocols, List<SignatureScheme> signatureSchemes, List<CipherSuite> cipherSuites, List<NamedGroup> groups) extends Record
What a server's certificate and ALPN selectors see of a ClientHello. Only code points this handshake supports are listed; others the client offered are left out.
  • Constructor Details

    • ClientHelloInfo

      public ClientHelloInfo(String serverName, List<String> alpnProtocols, List<SignatureScheme> signatureSchemes, List<CipherSuite> cipherSuites, List<NamedGroup> groups)
      Copies the lists.
      Parameters:
      serverName - the SNI host name, or null
      alpnProtocols - the offered application protocols
      signatureSchemes - the offered signature schemes
      cipherSuites - the offered cipher suites
      groups - the offered groups
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serverName

      public String serverName()
      Returns the value of the serverName record component.
      Returns:
      the value of the serverName record component
    • alpnProtocols

      public List<String> alpnProtocols()
      Returns the value of the alpnProtocols record component.
      Returns:
      the value of the alpnProtocols record component
    • signatureSchemes

      public List<SignatureScheme> signatureSchemes()
      Returns the value of the signatureSchemes record component.
      Returns:
      the value of the signatureSchemes record component
    • cipherSuites

      public List<CipherSuite> cipherSuites()
      Returns the value of the cipherSuites record component.
      Returns:
      the value of the cipherSuites record component
    • groups

      public List<NamedGroup> groups()
      Returns the value of the groups record component.
      Returns:
      the value of the groups record component