 Chromium Code Reviews
 Chromium Code Reviews Issue 2108833005:
  Adds domain names for all qualified CT logs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2108833005:
  Adds domain names for all qualified CT logs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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(CTLogVerifier::Create( | 
| 55 ct::GetTestPublicKey(), kLogDescription, "https://ct.example.com")); | 55 ct::GetTestPublicKey(), kLogDescription, "https://ct.example.com", "")); | 
| 
Ryan Sleevi
2016/07/18 19:06:38
std::string() not ""
 | |
| 56 ASSERT_TRUE(log); | 56 ASSERT_TRUE(log); | 
| 57 log_verifiers_.push_back(log); | 57 log_verifiers_.push_back(log); | 
| 58 | 58 | 
| 59 verifier_.reset(new MultiLogCTVerifier()); | 59 verifier_.reset(new MultiLogCTVerifier()); | 
| 60 verifier_->AddLogs(log_verifiers_); | 60 verifier_->AddLogs(log_verifiers_); | 
| 61 std::string der_test_cert(ct::GetDerEncodedX509Cert()); | 61 std::string der_test_cert(ct::GetDerEncodedX509Cert()); | 
| 62 chain_ = X509Certificate::CreateFromBytes( | 62 chain_ = X509Certificate::CreateFromBytes( | 
| 63 der_test_cert.data(), | 63 der_test_cert.data(), | 
| 64 der_test_cert.length()); | 64 der_test_cert.length()); | 
| 65 ASSERT_TRUE(chain_.get()); | 65 ASSERT_TRUE(chain_.get()); | 
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 Mock::VerifyAndClearExpectations(&observer); | 301 Mock::VerifyAndClearExpectations(&observer); | 
| 302 | 302 | 
| 303 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0); | 303 EXPECT_CALL(observer, OnSCTVerified(embedded_sct_chain_.get(), _)).Times(0); | 
| 304 verifier_->SetObserver(nullptr); | 304 verifier_->SetObserver(nullptr); | 
| 305 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_)); | 305 ASSERT_TRUE(VerifySinglePrecertificateChain(embedded_sct_chain_)); | 
| 306 } | 306 } | 
| 307 | 307 | 
| 308 } // namespace | 308 } // namespace | 
| 309 | 309 | 
| 310 } // namespace net | 310 } // namespace net | 
| OLD | NEW |