LibTLS: Rename Version to ProtocolVersion

This matches the wording used in the TLS RFC
Also define GREASE values as specified in RFC8701
This commit is contained in:
stelar7 2023-04-13 23:53:22 +02:00 committed by Sam Atkins
commit ca6b8bfe7f
Notes: sideshowbarker 2024-07-17 08:35:21 +09:00
5 changed files with 33 additions and 14 deletions

View file

@ -169,7 +169,7 @@ void TLSv12::build_rsa_pre_master_secret(PacketBuilder& builder)
dbgln("Server mode not supported");
return;
} else {
*(u16*)random_bytes = AK::convert_between_host_and_network_endian((u16)Version::V12);
*(u16*)random_bytes = AK::convert_between_host_and_network_endian((u16)ProtocolVersion::VERSION_1_2);
}
auto premaster_key_result = ByteBuffer::copy(random_bytes, bytes);