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

Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&>

This commit is contained in:
Ali Mohammad Pur 2021-06-08 19:36:27 +04:30 committed by Andreas Kling
parent 3d94b5051d
commit 7ac196974d
22 changed files with 92 additions and 94 deletions

View file

@ -228,7 +228,7 @@ ByteBuffer TLSv12::build_certificate()
{
PacketBuilder builder { MessageType::Handshake, m_context.options.version };
Vector<const Certificate*> certificates;
Vector<Certificate const&> certificates;
Vector<Certificate>* local_certificates = nullptr;
if (m_context.is_server) {
@ -250,7 +250,7 @@ ByteBuffer TLSv12::build_certificate()
// FIXME: Check for and respond with only the requested certificate types.
if (true) {
certificates.append(&certificate);
certificates.append(certificate);
}
}
}
@ -266,9 +266,9 @@ ByteBuffer TLSv12::build_certificate()
builder.append_u24(total_certificate_size);
for (auto& certificate : certificates) {
if (!certificate->der.is_empty()) {
builder.append_u24(certificate->der.size());
builder.append(certificate->der.bytes());
if (!certificate.der.is_empty()) {
builder.append_u24(certificate.der.size());
builder.append(certificate.der.bytes());
}
}
}