Class ClientHello


  • public class ClientHello
    extends java.lang.Object
    • Constructor Detail

      • ClientHello

        public ClientHello​(ProtocolVersion version,
                           byte[] random,
                           byte[] sessionID,
                           byte[] cookie,
                           int[] cipherSuites,
                           java.util.Hashtable extensions)
    • Method Detail

      • getCipherSuites

        public int[] getCipherSuites()
      • getCookie

        public byte[] getCookie()
      • getExtensions

        public java.util.Hashtable getExtensions()
      • getRandom

        public byte[] getRandom()
      • getSessionID

        public byte[] getSessionID()
      • encode

        public void encode​(TlsContext context,
                           java.io.OutputStream output)
                    throws java.io.IOException
        Encode this ClientHello to an OutputStream.
        Parameters:
        output - the OutputStream to encode to.
        Throws:
        java.io.IOException
      • parse

        public static ClientHello parse​(java.io.ByteArrayInputStream messageInput,
                                        java.io.OutputStream dtlsOutput)
                                 throws TlsFatalAlert
        Parse a ClientHello from a ByteArrayInputStream.
        Parameters:
        messageInput - the ByteArrayInputStream to parse from.
        dtlsOutput - for DTLS this should be non-null; the input is copied to this OutputStream, minus the cookie field.
        Returns:
        a ClientHello object.
        Throws:
        TlsFatalAlert