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

LibTLS: Remove all uses of VLAs

This commit is contained in:
Ali Mohammad Pur 2021-05-13 12:27:31 +04:30 committed by Andreas Kling
parent abda20e25e
commit 98ecb95709
3 changed files with 16 additions and 16 deletions

View file

@ -275,8 +275,9 @@ void TLSv12::build_random(PacketBuilder& builder)
Crypto::PK::RSA_PKCS1_EME rsa(certificate.public_key.modulus(), 0, certificate.public_key.public_exponent());
u8 out[rsa.output_size()];
auto outbuf = Bytes { out, rsa.output_size() };
Vector<u8, 32> out;
out.resize(rsa.output_size());
auto outbuf = out.span();
rsa.encrypt(m_context.premaster_key, outbuf);
if constexpr (TLS_DEBUG) {