mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:37:44 +00:00
LibTLS: Check if certificate is self signed before importing it as CA
This commit is contained in:
parent
114a383af3
commit
ee0ae18386
2 changed files with 8 additions and 6 deletions
|
@ -72,8 +72,11 @@ Vector<Certificate> load_certificates()
|
|||
continue;
|
||||
}
|
||||
auto certificate = certificate_result.release_value();
|
||||
if (certificate.is_certificate_authority)
|
||||
if (certificate.is_certificate_authority && certificate.is_self_signed()) {
|
||||
certificates.append(move(certificate));
|
||||
} else {
|
||||
dbgln("Skipped '{}' because it is not a valid root CA", certificate.subject_identifier_string());
|
||||
}
|
||||
}
|
||||
|
||||
return certificates;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue