Class ClientHello
java.lang.Object
tech.kwik.agent15.handshake.HandshakeMessage
tech.kwik.agent15.handshake.ClientHello
https://datatracker.ietf.org/doc/html/rfc8446#section-4.1.2
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientHello(String serverName, ECPublicKey publicKey) ClientHello(String serverName, ECPublicKey publicKey, boolean compatibilityMode, List<Extension> extraExtensions) ClientHello(String serverName, PublicKey publicKey, boolean compatibilityMode, List<TlsConstants.CipherSuite> supportedCiphers, List<TlsConstants.SignatureScheme> supportedSignatures, TlsConstants.NamedGroup ecCurve, List<Extension> extraExtensions, BinderCalculator binderCalculator, ClientHello.PskKeyEstablishmentMode pskKeyEstablishmentMode) ClientHello(ByteBuffer buffer, ExtensionParser customExtensionParser) Parses a ClientHello message from a byte stream. -
Method Summary
Methods inherited from class HandshakeMessage
checkForDuplicateExtensions, findPositionLastExtension, parseHandshakeHeader
-
Field Details
-
SUPPORTED_CIPHERS
-
-
Constructor Details
-
ClientHello
public ClientHello(ByteBuffer buffer, ExtensionParser customExtensionParser) throws TlsProtocolException, IllegalParameterAlert Parses a ClientHello message from a byte stream.- Parameters:
buffer-- Throws:
TlsProtocolExceptionIllegalParameterAlert
-
ClientHello
-
ClientHello
public ClientHello(String serverName, ECPublicKey publicKey, boolean compatibilityMode, List<Extension> extraExtensions) -
ClientHello
public ClientHello(String serverName, PublicKey publicKey, boolean compatibilityMode, List<TlsConstants.CipherSuite> supportedCiphers, List<TlsConstants.SignatureScheme> supportedSignatures, TlsConstants.NamedGroup ecCurve, List<Extension> extraExtensions, BinderCalculator binderCalculator, ClientHello.PskKeyEstablishmentMode pskKeyEstablishmentMode) - Parameters:
serverName-publicKey-compatibilityMode-supportedCiphers-supportedSignatures-ecCurve-extraExtensions-binderCalculator- can be null when no ClientHelloPreSharedKeyExtension is present, must be non-null when ClientHelloPreSharedKeyExtension is present.pskKeyEstablishmentMode-
-
-
Method Details
-
getType
- Specified by:
getTypein classHandshakeMessage
-
getBytes
public byte[] getBytes()- Specified by:
getBytesin classHandshakeMessage
-
getClientRandom
public byte[] getClientRandom() -
getSessionId
public byte[] getSessionId() -
getCipherSuites
-
getExtensions
-
getPskExtensionStartPosition
public int getPskExtensionStartPosition()Returns the start position of the PreSharedKeyExtension in the serialized ClientHello. This is needed for computing binders.- Returns:
- the start position or -1 if not present.
-
toString
-