Class TlsEngineImpl
java.lang.Object
tech.kwik.agent15.engine.impl.TlsEngineImpl
- All Implemented Interfaces:
MessageProcessor, TlsEngine, TrafficSecrets
- Direct Known Subclasses:
TlsClientEngineImpl, TlsServerEngineImpl
-
Field Summary
Fields -
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.byte[]byte[]byte[]abstract TlsConstants.CipherSuitebyte[]byte[]protected SignatureAlgorithmgetSignatureAlgorithm(TlsConstants.SignatureScheme signatureScheme) Returns the signature algorithm implementing the given signature scheme.static inthashLength(TlsConstants.CipherSuite cipher) static intkeyLength(TlsConstants.CipherSuite cipher) protected booleanrecognizedExtension(Extension extension)
-
Field Details
-
state
-
signatureAlgorithmFactory
-
-
Constructor Details
-
TlsEngineImpl
-
-
Method Details
-
getSelectedCipher
-
hashLength
-
keyLength
-
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
-
getSignatureAlgorithm
protected SignatureAlgorithm getSignatureAlgorithm(TlsConstants.SignatureScheme signatureScheme) throws HandshakeFailureAlert Returns the signature algorithm implementing the given signature scheme.- Parameters:
signatureScheme-- Returns:
- the signature algorithm, never null
- Throws:
HandshakeFailureAlert- when the scheme is not supported (i.e. no factory provides an implementation)
-
computeFinishedVerifyData
protected byte[] computeFinishedVerifyData(byte[] transcriptHash, byte[] baseKey) -
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
-