| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "net/cert/ct_policy_enforcer.h" | 5 #include "net/cert/ct_policy_enforcer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "base/version.h" | 11 #include "base/version.h" |
| 12 #include "crypto/sha2.h" | 12 #include "crypto/sha2.h" |
| 13 #include "net/base/test_data_directory.h" | |
| 14 #include "net/cert/ct_ev_whitelist.h" | 13 #include "net/cert/ct_ev_whitelist.h" |
| 15 #include "net/cert/ct_policy_status.h" | 14 #include "net/cert/ct_policy_status.h" |
| 16 #include "net/cert/ct_verify_result.h" | 15 #include "net/cert/ct_verify_result.h" |
| 17 #include "net/cert/x509_certificate.h" | 16 #include "net/cert/x509_certificate.h" |
| 18 #include "net/test/cert_test_util.h" | 17 #include "net/test/cert_test_util.h" |
| 19 #include "net/test/ct_test_util.h" | 18 #include "net/test/ct_test_util.h" |
| 19 #include "net/test/test_data_directory.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 class DummyEVCertsWhitelist : public ct::EVCertsWhitelist { | 27 class DummyEVCertsWhitelist : public ct::EVCertsWhitelist { |
| 28 public: | 28 public: |
| 29 DummyEVCertsWhitelist(bool is_valid_response, bool contains_hash_response) | 29 DummyEVCertsWhitelist(bool is_valid_response, bool contains_hash_response) |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 FillListWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 2, | 571 FillListWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 2, |
| 572 &scts); | 572 &scts); |
| 573 EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS, | 573 EXPECT_EQ(ct::EVPolicyCompliance::EV_POLICY_NOT_ENOUGH_SCTS, |
| 574 policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr, | 574 policy_enforcer_->DoesConformToCTEVPolicy(chain_.get(), nullptr, |
| 575 scts, BoundNetLog())); | 575 scts, BoundNetLog())); |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace | 578 } // namespace |
| 579 | 579 |
| 580 } // namespace net | 580 } // namespace net |
| OLD | NEW |