1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibTLS: Avoid unnecessary HashMap copies, improve const-correctness

This commit is contained in:
Ben Wiederhake 2023-05-13 20:51:24 +02:00 committed by Jelle Raaijmakers
parent f866c80222
commit 2bb2a7097d
4 changed files with 11 additions and 11 deletions

View file

@ -78,7 +78,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
auto certificate = Certificate::parse_certificate(buffer.slice(res_cert, certificate_size_specific), false);
if (!certificate.is_error()) {
m_context.certificates.append(certificate.value());
m_context.certificates.empend(certificate.value());
valid_certificate = true;
} else {
dbgln("Failed to parse client cert: {}", certificate.error());