Class TlsState
java.lang.Object
tech.kwik.agent15.engine.impl.TlsState
- All Implemented Interfaces:
BinderCalculator
-
Constructor Summary
ConstructorsConstructorDescriptionTlsState(TranscriptHash transcriptHash, byte[] psk, int keyLength, int hashLength) TlsState(TranscriptHash transcriptHash, int keyLength, int hashLength) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidbyte[]computePSK(byte[] ticketNonce) byte[]computePskBinder(byte[] transcriptPrefix, byte[] partialClientHello) Computes the binder for a client hello that is preceded by other handshake messages.voidbyte[]byte[]byte[]shortbyte[]byte[]byte[]hkdfExpandLabel(byte[] secret, String label, String context, short length) voidvoidsetPskSelected(int selectedIdentity) voidsetSharedSecret(byte[] secret) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BinderCalculator
computePskBinder
-
Constructor Details
-
TlsState
-
TlsState
-
-
Method Details
-
computePskBinder
public byte[] computePskBinder(byte[] transcriptPrefix, byte[] partialClientHello) Description copied from interface:BinderCalculatorComputes the binder for a client hello that is preceded by other handshake messages. https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.11.2 "If the server responds with a HelloRetryRequest and the client then sends ClientHello2, its binder will be computed over: Transcript-Hash(ClientHello1, HelloRetryRequest, Truncate(ClientHello2))"- Specified by:
computePskBinderin interfaceBinderCalculator- Parameters:
transcriptPrefix- the transcript that precedes the client hello (empty for a first client hello); for a second client hello, this is the synthetic message that replaces the first client hello followed by the hello retry requestpartialClientHello- the client hello up to (not including) the binders list
-
computeEarlyTrafficSecret
public void computeEarlyTrafficSecret() -
computeHandshakeSecrets
public void computeHandshakeSecrets() -
computeApplicationSecrets
public void computeApplicationSecrets() -
computeResumptionMasterSecret
public void computeResumptionMasterSecret() -
computePSK
public byte[] computePSK(byte[] ticketNonce) -
hkdfExpandLabel
-
getHashLength
public short getHashLength() -
getClientEarlyTrafficSecret
public byte[] getClientEarlyTrafficSecret() -
getClientHandshakeTrafficSecret
public byte[] getClientHandshakeTrafficSecret() -
getServerHandshakeTrafficSecret
public byte[] getServerHandshakeTrafficSecret() -
getClientApplicationTrafficSecret
public byte[] getClientApplicationTrafficSecret() -
getServerApplicationTrafficSecret
public byte[] getServerApplicationTrafficSecret() -
setPskSelected
- Throws:
IllegalParameterAlert
-
setNoPskSelected
public void setNoPskSelected()
-