| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |