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 clientVersion, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, java.util.Hashtable extensions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(TlsContext context, java.io.OutputStream output)
Encode thisClientHello
to anOutputStream
.int[]
getCipherSuites()
ProtocolVersion
getClientVersion()
byte[]
getCookie()
java.util.Hashtable
getExtensions()
byte[]
getRandom()
byte[]
getSessionID()
static ClientHello
parse(java.io.ByteArrayInputStream messageInput, java.io.OutputStream dtlsOutput)
Parse aClientHello
from aByteArrayInputStream
.
-
-
-
Constructor Detail
-
ClientHello
public ClientHello(ProtocolVersion clientVersion, byte[] random, byte[] sessionID, byte[] cookie, int[] cipherSuites, java.util.Hashtable extensions)
-
-
Method Detail
-
getCipherSuites
public int[] getCipherSuites()
-
getClientVersion
public ProtocolVersion getClientVersion()
-
getCookie
public byte[] getCookie()
-
getExtensions
public java.util.Hashtable getExtensions()
-
getRandom
public byte[] getRandom()
-
getSessionID
public byte[] getSessionID()
-
encode
public void encode(TlsContext context, java.io.OutputStream output) throws java.io.IOException
Encode thisClientHello
to anOutputStream
.- Parameters:
output
- theOutputStream
to encode to.- Throws:
java.io.IOException
-
parse
public static ClientHello parse(java.io.ByteArrayInputStream messageInput, java.io.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
Certificate
object. - Throws:
java.io.IOException
TlsFatalAlert
-
-