From 495b0f2bcc2990b85e740b7971779396cc99e5ec Mon Sep 17 00:00:00 2001 From: Michiel Visser Date: Mon, 27 Nov 2023 20:20:01 +0100 Subject: [PATCH] LibTLS: Improve message when root certificate is invalid Currently there is one root certificate which has expired, but it does not have a common name, so we are simply printing "Certificate for by is invalid, ...", which is less than useful. Instead we just print the complete subject now, and remove printing the issuer, as root certificates are always self-signed. --- Userland/Libraries/LibTLS/TLSv12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp index 96dc8fe71d..877d377ef4 100644 --- a/Userland/Libraries/LibTLS/TLSv12.cpp +++ b/Userland/Libraries/LibTLS/TLSv12.cpp @@ -208,7 +208,7 @@ void TLSv12::set_root_certificates(Vector certificates) for (auto& cert : certificates) { if (!cert.is_valid()) { - dbgln("Certificate for {} by {} is invalid, things may or may not work!", cert.subject.common_name(), cert.issuer.common_name()); + dbgln("Certificate for {} is invalid, things may or may not work!", cert.subject.to_string()); } // FIXME: Figure out what we should do when our root certs are invalid.