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

Side by Side Diff: net/quic/crypto/proof_verifier_chromium_test.cc

Issue 2108833005: Adds domain names for all qualified CT logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make dns_domain a required parameter of CtLogVerifier::Create Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/quic/crypto/proof_verifier_chromium.h" 5 #include "net/quic/crypto/proof_verifier_chromium.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "net/cert/cert_status_flags.h" 9 #include "net/cert/cert_status_flags.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 BoundNetLog())) {} 111 BoundNetLog())) {}
112 112
113 void SetUp() override { 113 void SetUp() override {
114 EXPECT_CALL(ct_policy_enforcer_, DoesConformToCertPolicy(_, _, _)) 114 EXPECT_CALL(ct_policy_enforcer_, DoesConformToCertPolicy(_, _, _))
115 .WillRepeatedly( 115 .WillRepeatedly(
116 Return(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS)); 116 Return(ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS));
117 EXPECT_CALL(ct_policy_enforcer_, DoesConformToCTEVPolicy(_, _, _, _)) 117 EXPECT_CALL(ct_policy_enforcer_, DoesConformToCTEVPolicy(_, _, _, _))
118 .WillRepeatedly( 118 .WillRepeatedly(
119 Return(ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY)); 119 Return(ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY));
120 120
121 scoped_refptr<const CTLogVerifier> log(CTLogVerifier::Create( 121 scoped_refptr<const CTLogVerifier> log(
122 ct::GetTestPublicKey(), kLogDescription, "https://test.example.com")); 122 CTLogVerifier::Create(ct::GetTestPublicKey(), kLogDescription,
123 "https://test.example.com", nullptr));
eroman 2016/07/18 17:09:46 Same comment throughout (nullptr is not distinguis
Rob Percival 2016/07/18 18:19:47 Done.
123 ASSERT_TRUE(log); 124 ASSERT_TRUE(log);
124 log_verifiers_.push_back(log); 125 log_verifiers_.push_back(log);
125 126
126 ct_verifier_.reset(new MultiLogCTVerifier()); 127 ct_verifier_.reset(new MultiLogCTVerifier());
127 ct_verifier_->AddLogs(log_verifiers_); 128 ct_verifier_->AddLogs(log_verifiers_);
128 129
129 ASSERT_NO_FATAL_FAILURE(GetTestCertificates(&certs_)); 130 ASSERT_NO_FATAL_FAILURE(GetTestCertificates(&certs_));
130 } 131 }
131 132
132 scoped_refptr<X509Certificate> GetTestServerCertificate() { 133 scoped_refptr<X509Certificate> GetTestServerCertificate() {
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 ProofVerifyDetailsChromium* verify_details = 583 ProofVerifyDetailsChromium* verify_details =
583 static_cast<ProofVerifyDetailsChromium*>(details_.get()); 584 static_cast<ProofVerifyDetailsChromium*>(details_.get());
584 EXPECT_TRUE(verify_details->cert_verify_result.cert_status & 585 EXPECT_TRUE(verify_details->cert_verify_result.cert_status &
585 CERT_STATUS_PINNED_KEY_MISSING); 586 CERT_STATUS_PINNED_KEY_MISSING);
586 EXPECT_TRUE(verify_details->cert_verify_result.cert_status & 587 EXPECT_TRUE(verify_details->cert_verify_result.cert_status &
587 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED); 588 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED);
588 } 589 }
589 590
590 } // namespace test 591 } // namespace test
591 } // namespace net 592 } // namespace net
OLDNEW
« net/cert/ct_objects_extractor_unittest.cc ('K') | « net/cert/multi_log_ct_verifier_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698