Package org.bouncycastle.tls
Class ClientHello
java.lang.Object
org.bouncycastle.tls.ClientHello
-
Constructor Summary
ConstructorDescriptionClientHello
(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, Hashtable extensions, int bindersSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(TlsContext context, OutputStream output) Encode thisClientHello
to anOutputStream
.int
int[]
Deprecated.byte[]
byte[]
byte[]
static ClientHello
parse
(ByteArrayInputStream messageInput, OutputStream dtlsOutput) Parse aClientHello
from aByteArrayInputStream
.
-
Constructor Details
-
ClientHello
public ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, Hashtable extensions, int bindersSize)
-
-
Method Details
-
getBindersSize
public int getBindersSize() -
getCipherSuites
public int[] getCipherSuites() -
getClientVersion
Deprecated.UsegetVersion()
instead. -
getCookie
public byte[] getCookie() -
getExtensions
-
getRandom
public byte[] getRandom() -
getSessionID
public byte[] getSessionID() -
getVersion
-
encode
Encode thisClientHello
to anOutputStream
.- Parameters:
output
- theOutputStream
to encode to.- Throws:
IOException
-
parse
public static ClientHello parse(ByteArrayInputStream messageInput, OutputStream dtlsOutput) throws TlsFatalAlert Parse aClientHello
from aByteArrayInputStream
.- Parameters:
messageInput
- theByteArrayInputStream
to parse from.dtlsOutput
- for DTLS this should be non-null; the input is copied to thisOutputStream
, minus the cookie field.- Returns:
- a
ClientHello
object. - Throws:
TlsFatalAlert
-
getVersion()
instead.