mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
headless-browser: Add ca-certs-path options
This commit is contained in:
parent
c837a1a8de
commit
2eb6dbd4f0
3 changed files with 23 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue