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

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

Issue 1081913003: Route OCSP stapling through CertVerifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: yet another CrOS-only Verify call Created 5 years, 8 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
« no previous file with comments | « net/cert_net/nss_ocsp_unittest.cc ('k') | net/socket/ssl_client_socket_nss.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/crypto/proof_verifier_chromium.h" 5 #include "net/quic/crypto/proof_verifier_chromium.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 callback->Run(rv == OK, error_details_, &verify_details); 216 callback->Run(rv == OK, error_details_, &verify_details);
217 // Will delete |this|. 217 // Will delete |this|.
218 proof_verifier_->OnJobComplete(this); 218 proof_verifier_->OnJobComplete(this);
219 } 219 }
220 } 220 }
221 221
222 int ProofVerifierChromium::Job::DoVerifyCert(int result) { 222 int ProofVerifierChromium::Job::DoVerifyCert(int result) {
223 next_state_ = STATE_VERIFY_CERT_COMPLETE; 223 next_state_ = STATE_VERIFY_CERT_COMPLETE;
224 224
225 int flags = 0; 225 int flags = 0;
226 return verifier_->Verify( 226 return verifier_->Verify(cert_.get(), hostname_, std::string(), flags,
227 cert_.get(), 227 SSLConfigService::GetCRLSet().get(),
228 hostname_, 228 &verify_details_->cert_verify_result,
229 flags, 229 base::Bind(&ProofVerifierChromium::Job::OnIOComplete,
230 SSLConfigService::GetCRLSet().get(), 230 base::Unretained(this)),
231 &verify_details_->cert_verify_result, 231 net_log_);
232 base::Bind(&ProofVerifierChromium::Job::OnIOComplete,
233 base::Unretained(this)),
234 net_log_);
235 } 232 }
236 233
237 int ProofVerifierChromium::Job::DoVerifyCertComplete(int result) { 234 int ProofVerifierChromium::Job::DoVerifyCertComplete(int result) {
238 verifier_.reset(); 235 verifier_.reset();
239 236
240 const CertVerifyResult& cert_verify_result = 237 const CertVerifyResult& cert_verify_result =
241 verify_details_->cert_verify_result; 238 verify_details_->cert_verify_result;
242 const CertStatus cert_status = cert_verify_result.cert_status; 239 const CertStatus cert_status = cert_verify_result.cert_status;
243 if (transport_security_state_ && 240 if (transport_security_state_ &&
244 (result == OK || 241 (result == OK ||
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 392 }
396 return status; 393 return status;
397 } 394 }
398 395
399 void ProofVerifierChromium::OnJobComplete(Job* job) { 396 void ProofVerifierChromium::OnJobComplete(Job* job) {
400 active_jobs_.erase(job); 397 active_jobs_.erase(job);
401 delete job; 398 delete job;
402 } 399 }
403 400
404 } // namespace net 401 } // namespace net
OLDNEW
« no previous file with comments | « net/cert_net/nss_ocsp_unittest.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698