Top Fields Constructors Methods
org.bouncycastle.tls

public Class ServerHello

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
ServerHello(byte[] sessionID, int cipherSuite, Hashtable<K, V> extensions)

public
ServerHello(ProtocolVersion version, byte[] random, byte[] sessionID, int cipherSuite, Hashtable<K, V> extensions)

Method Summary

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

Encode this ServerHello to an OutputStream.

public int
public Hashtable<K, V>
public byte[]
public byte[]
public ProtocolVersion
public boolean
public static ServerHello

Returns:

a ServerHello object.
parse
(ByteArrayInputStream
the ByteArrayInputStream to parse from.
input
)

Parse a ServerHello from a ByteArrayInputStream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cipherSuiteback to summary
private final int cipherSuite
extensionsback to summary
private final Hashtable<K, V> extensions
HELLO_RETRY_REQUEST_MAGICback to summary
private static final byte[] HELLO_RETRY_REQUEST_MAGIC
randomback to summary
private final byte[] random
sessionIDback to summary
private final byte[] sessionID
versionback to summary
private final ProtocolVersion version

Constructor Detail

ServerHelloback to summary
public ServerHello(byte[] sessionID, int cipherSuite, Hashtable<K, V> extensions)
ServerHelloback to summary
public ServerHello(ProtocolVersion version, byte[] random, byte[] sessionID, int cipherSuite, Hashtable<K, V> extensions)

Method Detail

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

Encode this ServerHello to an OutputStream.

Parameters
context:TlsContext

the TlsContext of the current connection.

output:OutputStream

the OutputStream to encode to.

getCipherSuiteback to summary
public int getCipherSuite()
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()
isHelloRetryRequestback to summary
public boolean isHelloRetryRequest()
parseback to summary
public static ServerHello parse(ByteArrayInputStream input) throws IOException

Parse a ServerHello from a ByteArrayInputStream.

Parameters
input:ByteArrayInputStream

the ByteArrayInputStream to parse from.

Returns:ServerHello

a ServerHello object.