Table of Contents

Class ClientHello

Namespace
Org.BouncyCastle.Tls
Assembly
BouncyCastle.Cryptography.dll
public sealed class ClientHello
Inheritance
ClientHello
Inherited Members

Constructors

ClientHello(ProtocolVersion, byte[], byte[], byte[], int[], IDictionary<int, byte[]>, int)

public ClientHello(ProtocolVersion version, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, IDictionary<int, byte[]> extensions, int bindersSize)

Parameters

version ProtocolVersion
random byte[]
sessionID byte[]
cookie byte[]
cipherSuites int[]
extensions IDictionary<int, byte[]>
bindersSize int

Properties

BindersSize

public int BindersSize { get; }

Property Value

int

CipherSuites

public int[] CipherSuites { get; }

Property Value

int[]
public byte[] Cookie { get; }

Property Value

byte[]

Extensions

public IDictionary<int, byte[]> Extensions { get; }

Property Value

IDictionary<int, byte[]>

Random

public byte[] Random { get; }

Property Value

byte[]

SessionID

public byte[] SessionID { get; }

Property Value

byte[]

Version

public ProtocolVersion Version { get; }

Property Value

ProtocolVersion

Methods

Encode(TlsContext, Stream)

Encode this ClientHello to a Stream.

public void Encode(TlsContext context, Stream output)

Parameters

context TlsContext

the TlsContext of the current connection.

output Stream

the Stream to encode to.

Exceptions

IOException

Parse(MemoryStream, Stream)

Parse a ClientHello from a MemoryStream.

public static ClientHello Parse(MemoryStream messageInput, Stream dtlsOutput)

Parameters

messageInput MemoryStream

the MemoryStream to parse from.

dtlsOutput Stream

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

Returns

ClientHello

a ClientHello object.

Exceptions

TlsFatalAlert