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

headless-browser: Add ca-certs-path options

This commit is contained in:
leeight 2022-09-30 14:59:37 +08:00 committed by Ali Mohammad Pur
parent c837a1a8de
commit 2eb6dbd4f0
3 changed files with 23 additions and 3 deletions

View file

@ -476,10 +476,15 @@ DefaultRootCACertificates::DefaultRootCACertificates()
return;
}
auto config = config_result.release_value();
reload_certificates(config);
}
for (auto& entity : config->groups()) {
for (auto& subject : config->keys(entity)) {
auto certificate_base64 = config->read_entry(entity, subject);
void DefaultRootCACertificates::reload_certificates(Core::ConfigFile& config)
{
m_ca_certificates.clear();
for (auto& entity : config.groups()) {
for (auto& subject : config.keys(entity)) {
auto certificate_base64 = config.read_entry(entity, subject);
auto certificate_data_result = decode_base64(certificate_base64);
if (certificate_data_result.is_error()) {
dbgln("Skipping CA Certificate {} {}: out of memory", entity, subject);