Class TlsEngineImpl
java.lang.Object
tech.kwik.agent15.engine.impl.TlsEngineImpl
- All Implemented Interfaces:
MessageProcessor, TlsEngine, TrafficSecrets
- Direct Known Subclasses:
TlsClientEngineImpl, TlsServerEngineImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AlgorithmMappingprotected PrivateKeyprotected PublicKeyprotected TlsState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]computeFinishedVerifyData(byte[] transcriptHash, byte[] baseKey) protected byte[]computeSignature(byte[] content, PrivateKey certificatePrivateKey, TlsConstants.SignatureScheme signatureScheme, boolean client) Compute the signature used in certificate verify message to proof possession of private key.protected voidgenerateKeys(TlsConstants.NamedGroup namedGroup) byte[]byte[]byte[]abstract TlsConstants.CipherSuitebyte[]byte[]protected SignaturegetSignatureAlgorithm(TlsConstants.SignatureScheme signatureScheme) static inthashLength(TlsConstants.CipherSuite cipher) static intkeyLength(TlsConstants.CipherSuite cipher) protected booleanrecognizedExtension(Extension extension)
-
Field Details
-
publicKey
-
privateKey
-
state
-
algorithmMapping
-
-
Constructor Details
-
TlsEngineImpl
public TlsEngineImpl()
-
-
Method Details
-
getSelectedCipher
-
hashLength
-
keyLength
-
generateKeys
-
computeSignature
protected byte[] computeSignature(byte[] content, PrivateKey certificatePrivateKey, TlsConstants.SignatureScheme signatureScheme, boolean client) throws ErrorAlert Compute the signature used in certificate verify message to proof possession of private key.- Parameters:
content- the content to be signed (transcript hash)certificatePrivateKey- the private key associated with the certificatesignatureScheme-client- whether the signature must be computed- Returns:
- Throws:
ErrorAlert
-
computeFinishedVerifyData
protected byte[] computeFinishedVerifyData(byte[] transcriptHash, byte[] baseKey) -
getSignatureAlgorithm
protected Signature getSignatureAlgorithm(TlsConstants.SignatureScheme signatureScheme) throws HandshakeFailureAlert - Throws:
HandshakeFailureAlert
-
getClientEarlyTrafficSecret
public byte[] getClientEarlyTrafficSecret()- Specified by:
getClientEarlyTrafficSecretin interfaceTrafficSecrets
-
getClientHandshakeTrafficSecret
public byte[] getClientHandshakeTrafficSecret()- Specified by:
getClientHandshakeTrafficSecretin interfaceTrafficSecrets
-
getServerHandshakeTrafficSecret
public byte[] getServerHandshakeTrafficSecret()- Specified by:
getServerHandshakeTrafficSecretin interfaceTrafficSecrets
-
getClientApplicationTrafficSecret
public byte[] getClientApplicationTrafficSecret()- Specified by:
getClientApplicationTrafficSecretin interfaceTrafficSecrets
-
getServerApplicationTrafficSecret
public byte[] getServerApplicationTrafficSecret()- Specified by:
getServerApplicationTrafficSecretin interfaceTrafficSecrets
-
recognizedExtension
-