Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: components/cronet/ios/cronet_environment.mm

Issue 2937523002: add setter for enable_pkp_bypass_etc (Closed)
Patch Set: add small todo Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/ios/cronet_environment.h ('k') | components/cronet/ios/test/cronet_pkp_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/cronet_environment.mm
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index 0154346394ef019405d3658b113497ca0f512283..99e9cf9398cce188446242dbf29c4dbccf0d5410 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -221,7 +221,8 @@ CronetEnvironment::CronetEnvironment(const std::string& user_agent,
http_cache_(URLRequestContextConfig::HttpCacheType::DISK),
user_agent_(user_agent),
user_agent_partial_(user_agent_partial),
- net_log_(new net::NetLog) {}
+ net_log_(new net::NetLog),
+ enable_pkp_bypass_for_local_trust_anchors_(true) {}
void CronetEnvironment::Start() {
// Threads setup.
@@ -346,7 +347,11 @@ void CronetEnvironment::InitializeOnNetworkThread() {
main_context_ = context_builder.Build();
- // Iterate through PKP configuration for every host.
+ main_context_->transport_security_state()
+ ->SetEnablePublicKeyPinningBypassForLocalTrustAnchors(
+ enable_pkp_bypass_for_local_trust_anchors_);
+
+ // Iterate trhough PKP configuration for every host.
for (const auto& pkp : config->pkp_list) {
// Add the host pinning.
main_context_->transport_security_state()->AddHPKP(
« no previous file with comments | « components/cronet/ios/cronet_environment.h ('k') | components/cronet/ios/test/cronet_pkp_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698