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

Side by Side Diff: net/cert/cert_policy_enforcer_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « net/base/test_completion_callback.h ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cert_policy_enforcer.h" 5 #include "net/cert/cert_policy_enforcer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 28 matching lines...) Expand all
39 protected: 39 protected:
40 ~DummyEVCertsWhitelist() override {} 40 ~DummyEVCertsWhitelist() override {}
41 41
42 private: 42 private:
43 bool canned_is_valid_; 43 bool canned_is_valid_;
44 bool canned_contains_response_; 44 bool canned_contains_response_;
45 }; 45 };
46 46
47 class CertPolicyEnforcerTest : public ::testing::Test { 47 class CertPolicyEnforcerTest : public ::testing::Test {
48 public: 48 public:
49 virtual void SetUp() override { 49 void SetUp() override {
50 policy_enforcer_.reset(new CertPolicyEnforcer(true)); 50 policy_enforcer_.reset(new CertPolicyEnforcer(true));
51 51
52 std::string der_test_cert(ct::GetDerEncodedX509Cert()); 52 std::string der_test_cert(ct::GetDerEncodedX509Cert());
53 chain_ = X509Certificate::CreateFromBytes(der_test_cert.data(), 53 chain_ = X509Certificate::CreateFromBytes(der_test_cert.data(),
54 der_test_cert.size()); 54 der_test_cert.size());
55 ASSERT_TRUE(chain_.get()); 55 ASSERT_TRUE(chain_.get());
56 } 56 }
57 57
58 void FillResultWithSCTsOfOrigin( 58 void FillResultWithSCTsOfOrigin(
59 ct::SignedCertificateTimestamp::Origin desired_origin, 59 ct::SignedCertificateTimestamp::Origin desired_origin,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ct::CTVerifyResult result; 194 ct::CTVerifyResult result;
195 FillResultWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 1, 195 FillResultWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 1,
196 &result); 196 &result);
197 EXPECT_FALSE(policy_enforcer_->DoesConformToCTEVPolicy( 197 EXPECT_FALSE(policy_enforcer_->DoesConformToCTEVPolicy(
198 chain_.get(), nullptr, result, BoundNetLog())); 198 chain_.get(), nullptr, result, BoundNetLog()));
199 } 199 }
200 200
201 } // namespace 201 } // namespace
202 202
203 } // namespace net 203 } // namespace net
OLDNEW
« no previous file with comments | « net/base/test_completion_callback.h ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698