mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 14:25:06 +00:00
LibTLS+LibCrypto: Remove all remaining uses of ByteBuffer::wrap()
This commit is contained in:
parent
050eb5afa8
commit
d5600e966a
6 changed files with 29 additions and 24 deletions
|
@ -290,7 +290,7 @@ 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 = ByteBuffer::wrap(out, rsa.output_size());
|
||||
auto outbuf = Bytes { out, rsa.output_size() };
|
||||
rsa.encrypt(m_context.premaster_key, outbuf);
|
||||
|
||||
#ifdef TLS_DEBUG
|
||||
|
@ -305,7 +305,7 @@ void TLSv12::build_random(PacketBuilder& builder)
|
|||
|
||||
builder.append_u24(outbuf.size() + 2);
|
||||
builder.append((u16)outbuf.size());
|
||||
builder.append(outbuf.bytes());
|
||||
builder.append(outbuf);
|
||||
}
|
||||
|
||||
ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue