Class TLSClientHelloExtractor


  • public class TLSClientHelloExtractor
    extends java.lang.Object
    This class extracts the SNI host name and ALPN protocols from a TLS client-hello message.
    • Field Detail

      • USE_TLS_RESPONSE

        public static byte[] USE_TLS_RESPONSE
        HTTP response sent to clients that connect without TLS when TLS is required.
    • Constructor Detail

      • TLSClientHelloExtractor

        public TLSClientHelloExtractor​(java.nio.ByteBuffer netInBuffer)
                                throws java.io.IOException
        Creates the instance of the parser and processes the provided buffer. The buffer position and limit will be modified during the execution of this method, but they will be returned to the original values before the method exits.
        Parameters:
        netInBuffer - The buffer containing the TLS data to process
        Throws:
        java.io.IOException - If the client hello message is malformed
    • Method Detail

      • getSNIValue

        public java.lang.String getSNIValue()
        Returns the SNI value provided by the client.
        Returns:
        The SNI value provided by the client converted to lower case if not already lower case
      • getClientRequestedCiphers

        public java.util.List<Cipher> getClientRequestedCiphers()
        Returns the list of cipher suites requested by the client.
        Returns:
        the list of requested cipher suites
      • getClientRequestedCipherNames

        public java.util.List<java.lang.String> getClientRequestedCipherNames()
        Returns the names of cipher suites requested by the client.
        Returns:
        the list of cipher suite names
      • getClientRequestedApplicationProtocols

        public java.util.List<java.lang.String> getClientRequestedApplicationProtocols()
        Returns the application-level protocols requested by the client.
        Returns:
        the list of requested application protocols
      • getClientRequestedProtocols

        public java.util.List<java.lang.String> getClientRequestedProtocols()
        Returns the transport protocols requested by the client.
        Returns:
        the list of requested protocols
      • getClientSupportedGroups

        public java.util.List<Group> getClientSupportedGroups()
        Returns the key exchange groups supported by the client.
        Returns:
        the list of supported groups
      • getClientSignatureSchemes

        public java.util.List<SignatureScheme> getClientSignatureSchemes()
        Returns the signature schemes requested by the client.
        Returns:
        the list of signature schemes