mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
LibTLS: Allow using other hash algorithms for HMAC
The standard allows for ciphers to define which hash to use. Fixes #7348
This commit is contained in:
parent
cb4a0dec8a
commit
4bbf954ad0
4 changed files with 56 additions and 14 deletions
|
@ -81,8 +81,8 @@ ssize_t TLSv12::handle_server_hello(ReadonlyBytes buffer, WritePacketStage& writ
|
|||
m_context.cipher = cipher;
|
||||
dbgln_if(TLS_DEBUG, "Cipher: {}", (u16)cipher);
|
||||
|
||||
// The handshake hash function is _always_ SHA256
|
||||
m_context.handshake_hash.initialize(Crypto::Hash::HashKind::SHA256);
|
||||
// Simplification: We only support handshake hash functions via HMAC
|
||||
m_context.handshake_hash.initialize(hmac_hash());
|
||||
|
||||
// Compression method
|
||||
if (buffer.size() - res < 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue