Chromium Code Reviews| Index: components/cronet/ios/Cronet.mm |
| diff --git a/components/cronet/ios/Cronet.mm b/components/cronet/ios/Cronet.mm |
| index caee74151420f79330071e89364690556ceacd8e..e30beea0a447f696a91a83804abdb354d054d147 100644 |
| --- a/components/cronet/ios/Cronet.mm |
| +++ b/components/cronet/ios/Cronet.mm |
| @@ -49,6 +49,7 @@ NSURLCache* gPreservedSharedURLCache = nil; |
| BOOL gEnableTestCertVerifierForTesting = FALSE; |
| std::unique_ptr<net::CertVerifier> gMockCertVerifier; |
| NSString* gAcceptLanguages = nil; |
| +BOOL gEnablePKPBypassForLocalTrustAnchors = TRUE; |
|
mef
2017/06/13 20:52:58
Hrm, we mix YES/NO and TRUE/FALSE in this file.
T
lilyhoughton
2017/06/14 15:58:41
Done.
|
| // CertVerifier, which allows any certificates for testing. |
| class TestCertVerifier : public net::CertVerifier { |
| @@ -236,6 +237,10 @@ class CronetHttpProtocolHandlerDelegate |
| gPkpList.push_back(std::move(pkp)); |
| } |
| ++ (void)setEnablePublicKeyPinningBypassForLocalTrustAnchors:(bool)enable { |
|
mef
2017/06/13 20:52:58
BOOL
lilyhoughton
2017/06/14 15:58:41
Done.
|
| + gEnablePKPBypassForLocalTrustAnchors = enable; |
| +} |
| + |
| + (void)startInternal { |
| std::string user_agent = base::SysNSStringToUTF8(gUserAgent); |
| @@ -253,6 +258,9 @@ class CronetHttpProtocolHandlerDelegate |
| gChromeNet.Get()->set_ssl_key_log_file_name( |
| base::SysNSStringToUTF8(gSslKeyLogFileName)); |
| gChromeNet.Get()->set_pkp_list(std::move(gPkpList)); |
| + gChromeNet.Get() |
| + ->set_enable_public_key_pinning_bypass_for_local_trust_anchors( |
| + gEnablePKPBypassForLocalTrustAnchors); |
| for (const auto* quicHint : gQuicHints) { |
| gChromeNet.Get()->AddQuicHint(quicHint->host, quicHint->port, |
| quicHint->alternate_port); |