Top Fields Constructors Methods
org.bouncycastle.tls

public Class ClientHello

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .OutputStream, java.util.Hashtable, org.bouncycastle.util.Arrays, org.bouncycastle.util.io.TeeInputStream

Field Summary

Modifier and TypeField and Description
private final int
private final int[]
private final byte[]
private final Hashtable<K, V>
private final byte[]
private final byte[]
private final ProtocolVersion

Constructor Summary

AccessConstructor and Description
public
ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, Hashtable<K, V> extensions, int bindersSize)

Method Summary

Modifier and TypeMethod and Description
public void
encode(TlsContext context, OutputStream
the OutputStream to encode to.
output
)

Encode this ClientHello to an OutputStream.

public int
public int[]
public ProtocolVersion
getClientVersion()

Deprecated Use getVersion() instead.
public byte[]
public Hashtable<K, V>
public byte[]
public byte[]
public ProtocolVersion
private static ClientHello
implParse(ByteArrayInputStream messageInput, OutputStream dtlsOutput)

public static ClientHello

Returns:

a ClientHello object.
parse
(ByteArrayInputStream
the ByteArrayInputStream to parse from.
messageInput
,
OutputStream
for DTLS this should be non-null; the input is copied to this OutputStream, minus the cookie field.
dtlsOutput
)

Parse a ClientHello from a ByteArrayInputStream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindersSizeback to summary
private final int bindersSize
cipherSuitesback to summary
private final int[] cipherSuites
extensionsback to summary
private final Hashtable<K, V> extensions
randomback to summary
private final byte[] random
sessionIDback to summary
private final byte[] sessionID
versionback to summary
private final ProtocolVersion version

Constructor Detail

ClientHelloback to summary
public ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, Hashtable<K, V> extensions, int bindersSize)

Method Detail

encodeback to summary
public void encode(TlsContext context, OutputStream output) throws IOException

Encode this ClientHello to an OutputStream.

Parameters
output:OutputStream

the OutputStream to encode to.

getBindersSizeback to summary
public int getBindersSize()
getCipherSuitesback to summary
public int[] getCipherSuites()
getClientVersionback to summary
public ProtocolVersion getClientVersion()

Deprecated

Use getVersion() instead.

getCookieback to summary
public byte[] getCookie()
getExtensionsback to summary
public Hashtable<K, V> getExtensions()
getRandomback to summary
public byte[] getRandom()
getSessionIDback to summary
public byte[] getSessionID()
getVersionback to summary
public ProtocolVersion getVersion()
implParseback to summary
private static ClientHello implParse(ByteArrayInputStream messageInput, OutputStream dtlsOutput) throws IOException
parseback to summary
public static ClientHello parse(ByteArrayInputStream messageInput, OutputStream dtlsOutput) throws TlsFatalAlert

Parse a ClientHello from a ByteArrayInputStream.

Parameters
messageInput:ByteArrayInputStream

the ByteArrayInputStream to parse from.

dtlsOutput:OutputStream

for DTLS this should be non-null; the input is copied to this OutputStream, minus the cookie field.

Returns:ClientHello

a ClientHello object.