OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <memory> | 5 #include <memory> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 9832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9843 public: | 9843 public: |
9844 AllowAnyCertCTPolicyEnforcer() = default; | 9844 AllowAnyCertCTPolicyEnforcer() = default; |
9845 ~AllowAnyCertCTPolicyEnforcer() override = default; | 9845 ~AllowAnyCertCTPolicyEnforcer() override = default; |
9846 | 9846 |
9847 ct::CertPolicyCompliance DoesConformToCertPolicy( | 9847 ct::CertPolicyCompliance DoesConformToCertPolicy( |
9848 X509Certificate* cert, | 9848 X509Certificate* cert, |
9849 const SCTList& verified_scts, | 9849 const SCTList& verified_scts, |
9850 const NetLogWithSource& net_log) override { | 9850 const NetLogWithSource& net_log) override { |
9851 return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; | 9851 return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; |
9852 } | 9852 } |
9853 | |
9854 ct::EVPolicyCompliance DoesConformToCTEVPolicy( | |
9855 X509Certificate* cert, | |
9856 const ct::EVCertsWhitelist* ev_whitelist, | |
9857 const SCTList& verified_scts, | |
9858 const NetLogWithSource& net_log) override { | |
9859 return ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS; | |
9860 } | |
9861 }; | 9853 }; |
9862 // SetupContext configures the URLRequestContext that will be used for making | 9854 // SetupContext configures the URLRequestContext that will be used for making |
9863 // connetions to testserver. This can be overridden in test subclasses for | 9855 // connetions to testserver. This can be overridden in test subclasses for |
9864 // different behaviour. | 9856 // different behaviour. |
9865 virtual void SetupContext() { | 9857 virtual void SetupContext() { |
9866 context_.set_ssl_config_service(new TestSSLConfigService( | 9858 context_.set_ssl_config_service(new TestSSLConfigService( |
9867 true /* check for EV */, true /* online revocation checking */, | 9859 true /* check for EV */, true /* online revocation checking */, |
9868 false /* require rev. checking for local | 9860 false /* require rev. checking for local |
9869 anchors */, | 9861 anchors */, |
9870 false /* token binding enabled */)); | 9862 false /* token binding enabled */)); |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11249 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 11241 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
11250 | 11242 |
11251 req->Start(); | 11243 req->Start(); |
11252 req->Cancel(); | 11244 req->Cancel(); |
11253 base::RunLoop().RunUntilIdle(); | 11245 base::RunLoop().RunUntilIdle(); |
11254 EXPECT_EQ(ERR_ABORTED, d.request_status()); | 11246 EXPECT_EQ(ERR_ABORTED, d.request_status()); |
11255 EXPECT_EQ(0, d.received_redirect_count()); | 11247 EXPECT_EQ(0, d.received_redirect_count()); |
11256 } | 11248 } |
11257 | 11249 |
11258 } // namespace net | 11250 } // namespace net |
OLD | NEW |