Package org.bouncycastle.tls
Class ClientHello
- java.lang.Object
-
- org.bouncycastle.tls.ClientHello
-
public class ClientHello extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, java.util.Hashtable extensions, int bindersSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidencode(TlsContext context, java.io.OutputStream output)Encode thisClientHelloto anOutputStream.intgetBindersSize()int[]getCipherSuites()ProtocolVersiongetClientVersion()Deprecated.UsegetVersion()instead.byte[]getCookie()java.util.HashtablegetExtensions()byte[]getRandom()byte[]getSessionID()ProtocolVersiongetVersion()static ClientHelloparse(java.io.ByteArrayInputStream messageInput, java.io.OutputStream dtlsOutput)Parse aClientHellofrom aByteArrayInputStream.
-
-
-
Constructor Detail
-
ClientHello
public ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, java.util.Hashtable extensions, int bindersSize)
-
-
Method Detail
-
getBindersSize
public int getBindersSize()
-
getCipherSuites
public int[] getCipherSuites()
-
getClientVersion
public ProtocolVersion getClientVersion()
Deprecated.UsegetVersion()instead.
-
getCookie
public byte[] getCookie()
-
getExtensions
public java.util.Hashtable getExtensions()
-
getRandom
public byte[] getRandom()
-
getSessionID
public byte[] getSessionID()
-
getVersion
public ProtocolVersion getVersion()
-
encode
public void encode(TlsContext context, java.io.OutputStream output) throws java.io.IOException
Encode thisClientHelloto anOutputStream.- Parameters:
output- theOutputStreamto encode to.- Throws:
java.io.IOException
-
parse
public static ClientHello parse(java.io.ByteArrayInputStream messageInput, java.io.OutputStream dtlsOutput) throws TlsFatalAlert
Parse aClientHellofrom aByteArrayInputStream.- Parameters:
messageInput- theByteArrayInputStreamto parse from.dtlsOutput- for DTLS this should be non-null; the input is copied to thisOutputStream, minus the cookie field.- Returns:
- a
ClientHelloobject. - Throws:
TlsFatalAlert
-
-