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

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

Issue 2495583002: Defang the CT Timebomb (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | net/socket/ssl_client_socket_impl.cc » ('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 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/quic/chromium/crypto/proof_verifier_chromium.h" 5 #include "net/quic/chromium/crypto/proof_verifier_chromium.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 } 420 }
421 421
422 verify_details_->ct_verify_result.cert_policy_compliance = 422 verify_details_->ct_verify_result.cert_policy_compliance =
423 policy_enforcer_->DoesConformToCertPolicy( 423 policy_enforcer_->DoesConformToCertPolicy(
424 cert_verify_result.verified_cert.get(), verified_scts, net_log_); 424 cert_verify_result.verified_cert.get(), verified_scts, net_log_);
425 425
426 int ct_result = OK; 426 int ct_result = OK;
427 if (verify_details_->ct_verify_result.cert_policy_compliance != 427 if (verify_details_->ct_verify_result.cert_policy_compliance !=
428 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS && 428 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS &&
429 verify_details_->ct_verify_result.cert_policy_compliance !=
430 ct::CertPolicyCompliance::CERT_POLICY_BUILD_NOT_TIMELY &&
429 transport_security_state_->ShouldRequireCT( 431 transport_security_state_->ShouldRequireCT(
430 hostname_, cert_verify_result.verified_cert.get(), 432 hostname_, cert_verify_result.verified_cert.get(),
431 cert_verify_result.public_key_hashes)) { 433 cert_verify_result.public_key_hashes)) {
432 verify_details_->cert_verify_result.cert_status |= 434 verify_details_->cert_verify_result.cert_status |=
433 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED; 435 CERT_STATUS_CERTIFICATE_TRANSPARENCY_REQUIRED;
434 ct_result = ERR_CERTIFICATE_TRANSPARENCY_REQUIRED; 436 ct_result = ERR_CERTIFICATE_TRANSPARENCY_REQUIRED;
435 } 437 }
436 438
437 TransportSecurityState::PKPStatus pin_validity = 439 TransportSecurityState::PKPStatus pin_validity =
438 transport_security_state_->CheckPublicKeyPins( 440 transport_security_state_->CheckPublicKeyPins(
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 active_jobs_[job_ptr] = std::move(job); 611 active_jobs_[job_ptr] = std::move(job);
610 } 612 }
611 return status; 613 return status;
612 } 614 }
613 615
614 void ProofVerifierChromium::OnJobComplete(Job* job) { 616 void ProofVerifierChromium::OnJobComplete(Job* job) {
615 active_jobs_.erase(job); 617 active_jobs_.erase(job);
616 } 618 }
617 619
618 } // namespace net 620 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698