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

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

Issue 2269383003: Certificate Transparency: Make DNS front-end required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing the md file Created 4 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/multi_log_ct_verifier.h" 5 #include "net/cert/multi_log_ct_verifier.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class MockSCTObserver : public CTVerifier::Observer { 44 class MockSCTObserver : public CTVerifier::Observer {
45 public: 45 public:
46 MOCK_METHOD2(OnSCTVerified, 46 MOCK_METHOD2(OnSCTVerified,
47 void(X509Certificate* cert, 47 void(X509Certificate* cert,
48 const ct::SignedCertificateTimestamp* sct)); 48 const ct::SignedCertificateTimestamp* sct));
49 }; 49 };
50 50
51 class MultiLogCTVerifierTest : public ::testing::Test { 51 class MultiLogCTVerifierTest : public ::testing::Test {
52 public: 52 public:
53 void SetUp() override { 53 void SetUp() override {
54 scoped_refptr<const CTLogVerifier> log(CTLogVerifier::Create( 54 scoped_refptr<const CTLogVerifier> log(
55 ct::GetTestPublicKey(), kLogDescription, "https://ct.example.com", "")); 55 CTLogVerifier::Create(ct::GetTestPublicKey(), kLogDescription,
56 "https://ct.example.com", "dns.example.com"));
56 ASSERT_TRUE(log); 57 ASSERT_TRUE(log);
57 log_verifiers_.push_back(log); 58 log_verifiers_.push_back(log);
58 59
59 verifier_.reset(new MultiLogCTVerifier()); 60 verifier_.reset(new MultiLogCTVerifier());
60 verifier_->AddLogs(log_verifiers_); 61 verifier_->AddLogs(log_verifiers_);
61 std::string der_test_cert(ct::GetDerEncodedX509Cert()); 62 std::string der_test_cert(ct::GetDerEncodedX509Cert());
62 chain_ = X509Certificate::CreateFromBytes( 63 chain_ = X509Certificate::CreateFromBytes(
63 der_test_cert.data(), 64 der_test_cert.data(),
64 der_test_cert.length()); 65 der_test_cert.length());
65 ASSERT_TRUE(chain_.get()); 66 ASSERT_TRUE(chain_.get());
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 Mock::VerifyAndClearExpectations(&observer); 297 Mock::VerifyAndClearExpectations(&observer);
297 298
298 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0); 299 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0);
299 verifier_->SetObserver(nullptr); 300 verifier_->SetObserver(nullptr);
300 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_)); 301 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_));
301 } 302 }
302 303
303 } // namespace 304 } // namespace
304 305
305 } // namespace net 306 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/ct_objects_extractor_unittest.cc ('k') | net/quic/chromium/crypto/proof_verifier_chromium_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698