feat: allow setting SSL config (#25461)
* feat: allow setting SSL config * lint * configure system network context with min TLS1.2 * fix * note defaults
This commit is contained in:
parent
515e85079f
commit
27ea3fc069
7 changed files with 108 additions and 0 deletions
|
@ -106,6 +106,7 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition,
|
|||
storage_policy_(new SpecialStoragePolicy),
|
||||
protocol_registry_(new ProtocolRegistry),
|
||||
in_memory_(in_memory),
|
||||
ssl_config_(network::mojom::SSLConfig::New()),
|
||||
weak_factory_(this) {
|
||||
// TODO(nornagon): remove once https://crbug.com/1048822 is fixed.
|
||||
base::ScopedAllowBlockingForTesting allow_blocking;
|
||||
|
@ -446,6 +447,22 @@ ResolveProxyHelper* ElectronBrowserContext::GetResolveProxyHelper() {
|
|||
return resolve_proxy_helper_.get();
|
||||
}
|
||||
|
||||
network::mojom::SSLConfigPtr ElectronBrowserContext::GetSSLConfig() {
|
||||
return ssl_config_.Clone();
|
||||
}
|
||||
|
||||
void ElectronBrowserContext::SetSSLConfig(network::mojom::SSLConfigPtr config) {
|
||||
ssl_config_ = std::move(config);
|
||||
if (ssl_config_client_) {
|
||||
ssl_config_client_->OnSSLConfigUpdated(ssl_config_.Clone());
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronBrowserContext::SetSSLConfigClient(
|
||||
mojo::Remote<network::mojom::SSLConfigClient> client) {
|
||||
ssl_config_client_ = std::move(client);
|
||||
}
|
||||
|
||||
// static
|
||||
ElectronBrowserContext* ElectronBrowserContext::From(
|
||||
const std::string& partition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue