mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibTLS: Treat a close_notify before agreeing on a cipher suite as a handshake failure
Some TLS implementations (namely, AWS CloudFront) do this instead of sending handshake_failure for some reason.
This commit is contained in:
parent
328e481ee9
commit
63a94deb43
Notes:
sideshowbarker
2024-07-19 01:43:08 +09:00
Author: https://github.com/Lubrsi
Commit: 63a94deb43
Pull-request: https://github.com/SerenityOS/serenity/pull/3851
1 changed files with 6 additions and 0 deletions
|
@ -315,6 +315,12 @@ ssize_t TLSv12::handle_message(const ByteBuffer& buffer)
|
||||||
res += 2;
|
res += 2;
|
||||||
alert(AlertLevel::Critical, AlertDescription::CloseNotify);
|
alert(AlertLevel::Critical, AlertDescription::CloseNotify);
|
||||||
m_context.connection_finished = true;
|
m_context.connection_finished = true;
|
||||||
|
if (!m_context.cipher_spec_set) {
|
||||||
|
// AWS CloudFront hits this.
|
||||||
|
dbg() << "Server sent a close notify and we haven't agreed on a cipher suite. Treating it as a handshake failure.";
|
||||||
|
m_context.critical_error = (u8)AlertDescription::HandshakeFailure;
|
||||||
|
try_disambiguate_error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_context.error_code = (Error)code;
|
m_context.error_code = (Error)code;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue