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.
This commit is contained in:
Michiel Visser 2023-11-27 20:20:01 +01:00 committed by Ali Mohammad Pur
parent 000f0274e2
commit 495b0f2bcc

View file

@ -208,7 +208,7 @@ void TLSv12::set_root_certificates(Vector<Certificate> 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.