- java.lang.Object
-
- net.luminis.tls.engine.impl.TlsState
-
- All Implemented Interfaces:
BinderCalculator
public class TlsState extends java.lang.Object implements BinderCalculator
-
-
Constructor Summary
Constructors Constructor Description TlsState(TranscriptHash transcriptHash, byte[] psk, int keyLength, int hashLength)TlsState(TranscriptHash transcriptHash, int keyLength, int hashLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeApplicationSecrets()voidcomputeEarlyTrafficSecret()voidcomputeHandshakeSecrets()byte[]computePSK(byte[] ticketNonce)byte[]computePskBinder(byte[] partialClientHello)voidcomputeResumptionMasterSecret()voidcomputeSharedSecret()byte[]getClientApplicationTrafficSecret()byte[]getClientEarlyTrafficSecret()byte[]getClientHandshakeTrafficSecret()shortgetHashLength()byte[]getServerApplicationTrafficSecret()byte[]getServerHandshakeTrafficSecret()byte[]hkdfExpandLabel(byte[] secret, java.lang.String label, java.lang.String context, short length)voidsetNoPskSelected()voidsetOwnKey(java.security.PrivateKey clientPrivateKey)voidsetPeerKey(java.security.PublicKey serverSharedKey)voidsetPskSelected(int selectedIdentity)
-
-
-
Constructor Detail
-
TlsState
public TlsState(TranscriptHash transcriptHash, byte[] psk, int keyLength, int hashLength)
-
TlsState
public TlsState(TranscriptHash transcriptHash, int keyLength, int hashLength)
-
-
Method Detail
-
computePskBinder
public byte[] computePskBinder(byte[] partialClientHello)
- Specified by:
computePskBinderin interfaceBinderCalculator
-
computeSharedSecret
public void computeSharedSecret()
-
computeEarlyTrafficSecret
public void computeEarlyTrafficSecret()
-
computeHandshakeSecrets
public void computeHandshakeSecrets()
-
computeApplicationSecrets
public void computeApplicationSecrets()
-
computeResumptionMasterSecret
public void computeResumptionMasterSecret()
-
computePSK
public byte[] computePSK(byte[] ticketNonce)
-
hkdfExpandLabel
public byte[] hkdfExpandLabel(byte[] secret, java.lang.String label, java.lang.String context, short length)
-
getHashLength
public short getHashLength()
-
getClientEarlyTrafficSecret
public byte[] getClientEarlyTrafficSecret()
-
getClientHandshakeTrafficSecret
public byte[] getClientHandshakeTrafficSecret()
-
getServerHandshakeTrafficSecret
public byte[] getServerHandshakeTrafficSecret()
-
getClientApplicationTrafficSecret
public byte[] getClientApplicationTrafficSecret()
-
getServerApplicationTrafficSecret
public byte[] getServerApplicationTrafficSecret()
-
setOwnKey
public void setOwnKey(java.security.PrivateKey clientPrivateKey)
-
setPskSelected
public void setPskSelected(int selectedIdentity)
-
setNoPskSelected
public void setNoPskSelected()
-
setPeerKey
public void setPeerKey(java.security.PublicKey serverSharedKey)
-
-