1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibTLS: Move TLS extensions to a separate 'extensions' struct

This has no behavioural effect.
This commit is contained in:
AnotherTest 2021-02-07 07:19:34 +03:30 committed by Andreas Kling
parent 22d13d8b1a
commit d6d6750dd8
4 changed files with 12 additions and 9 deletions

View file

@ -86,8 +86,8 @@ ByteBuffer TLSv12::build_hello()
// set SNI if we have one
auto sni_length = 0;
if (!m_context.SNI.is_null())
sni_length = m_context.SNI.length();
if (!m_context.extensions.SNI.is_null())
sni_length = m_context.extensions.SNI.length();
if (sni_length)
extension_length += sni_length + 9;
@ -105,7 +105,7 @@ ByteBuffer TLSv12::build_hello()
builder.append((u8)0);
// SNI host length + value
builder.append((u16)sni_length);
builder.append((const u8*)m_context.SNI.characters(), sni_length);
builder.append((const u8*)m_context.extensions.SNI.characters(), sni_length);
}
if (alpn_length) {