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

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

Issue 2225223002: Certificate Transparency: Change CTVerifyResult to have a single list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NetLog int to string Created 4 years, 4 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/chromium/crypto/proof_verifier_chromium.h" 5 #include "net/quic/chromium/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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 reinterpret_cast<ProofVerifyDetailsChromium*>(details_.get()); 198 reinterpret_cast<ProofVerifyDetailsChromium*>(details_.get());
199 const ct::CTVerifyResult& ct_verify_result = 199 const ct::CTVerifyResult& ct_verify_result =
200 proof_details->ct_verify_result; 200 proof_details->ct_verify_result;
201 if (sct_expected_ok) { 201 if (sct_expected_ok) {
202 ASSERT_TRUE(ct::CheckForSingleVerifiedSCTInResult(ct_verify_result, 202 ASSERT_TRUE(ct::CheckForSingleVerifiedSCTInResult(ct_verify_result,
203 kLogDescription)); 203 kLogDescription));
204 ASSERT_TRUE(ct::CheckForSCTOrigin( 204 ASSERT_TRUE(ct::CheckForSCTOrigin(
205 ct_verify_result, 205 ct_verify_result,
206 ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION)); 206 ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION));
207 } else { 207 } else {
208 EXPECT_EQ(1U, ct_verify_result.unknown_logs_scts.size()); 208 EXPECT_EQ(1U, ct_verify_result.scts.size());
209 EXPECT_EQ(ct::SCT_STATUS_LOG_UNKNOWN, ct_verify_result.scts[0].status);
209 } 210 }
210 } 211 }
211 212
212 protected: 213 protected:
213 TransportSecurityState transport_security_state_; 214 TransportSecurityState transport_security_state_;
214 MockCTPolicyEnforcer ct_policy_enforcer_; 215 MockCTPolicyEnforcer ct_policy_enforcer_;
215 216
216 std::unique_ptr<MultiLogCTVerifier> ct_verifier_; 217 std::unique_ptr<MultiLogCTVerifier> ct_verifier_;
217 std::vector<scoped_refptr<const CTLogVerifier>> log_verifiers_; 218 std::vector<scoped_refptr<const CTLogVerifier>> log_verifiers_;
218 std::unique_ptr<ProofVerifyContext> verify_context_; 219 std::unique_ptr<ProofVerifyContext> verify_context_;
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 ASSERT_EQ(QUIC_SUCCESS, status); 613 ASSERT_EQ(QUIC_SUCCESS, status);
613 614
614 ASSERT_TRUE(details_.get()); 615 ASSERT_TRUE(details_.get());
615 ProofVerifyDetailsChromium* verify_details = 616 ProofVerifyDetailsChromium* verify_details =
616 static_cast<ProofVerifyDetailsChromium*>(details_.get()); 617 static_cast<ProofVerifyDetailsChromium*>(details_.get());
617 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status); 618 EXPECT_EQ(0u, verify_details->cert_verify_result.cert_status);
618 } 619 }
619 620
620 } // namespace test 621 } // namespace test
621 } // namespace net 622 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/crypto/proof_verifier_chromium.cc ('k') | net/socket/ssl_client_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698