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

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

Issue 2400183002: Cleanup: More accurate output parameter type for CTVerifier (Closed)
Patch Set: Created 4 years, 2 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/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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 verify_details_.reset(new ProofVerifyDetailsChromium); 223 verify_details_.reset(new ProofVerifyDetailsChromium);
224 224
225 // Converts |certs| to |cert_|. 225 // Converts |certs| to |cert_|.
226 if (!GetX509Certificate(certs, error_details, verify_details)) 226 if (!GetX509Certificate(certs, error_details, verify_details))
227 return QUIC_FAILURE; 227 return QUIC_FAILURE;
228 228
229 if (!cert_sct.empty()) { 229 if (!cert_sct.empty()) {
230 // Note that this is a completely synchronous operation: The CT Log Verifier 230 // Note that this is a completely synchronous operation: The CT Log Verifier
231 // gets all the data it needs for SCT verification and does not do any 231 // gets all the data it needs for SCT verification and does not do any
232 // external communication. 232 // external communication.
233 cert_transparency_verifier_->Verify(cert_.get(), std::string(), cert_sct, 233 cert_transparency_verifier_->Verify(
234 &verify_details_->ct_verify_result, 234 cert_.get(), std::string(), cert_sct,
235 net_log_); 235 &(verify_details_->ct_verify_result.scts), net_log_);
Ryan Sleevi 2016/10/07 14:05:28 Are the parens necessary here?
Eran Messeri 2016/10/10 13:14:09 Done, removed.
236 } 236 }
237 237
238 // We call VerifySignature first to avoid copying of server_config and 238 // We call VerifySignature first to avoid copying of server_config and
239 // signature. 239 // signature.
240 if (!signature.empty() && 240 if (!signature.empty() &&
241 !VerifySignature(server_config, quic_version, chlo_hash, signature, 241 !VerifySignature(server_config, quic_version, chlo_hash, signature,
242 certs[0])) { 242 certs[0])) {
243 *error_details = "Failed to verify signature of server config"; 243 *error_details = "Failed to verify signature of server config";
244 DLOG(WARNING) << *error_details; 244 DLOG(WARNING) << *error_details;
245 verify_details_->cert_verify_result.cert_status = CERT_STATUS_INVALID; 245 verify_details_->cert_verify_result.cert_status = CERT_STATUS_INVALID;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 active_jobs_.insert(job.release()); 614 active_jobs_.insert(job.release());
615 return status; 615 return status;
616 } 616 }
617 617
618 void ProofVerifierChromium::OnJobComplete(Job* job) { 618 void ProofVerifierChromium::OnJobComplete(Job* job) {
619 active_jobs_.erase(job); 619 active_jobs_.erase(job);
620 delete job; 620 delete job;
621 } 621 }
622 622
623 } // namespace net 623 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698