| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
| 6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
| 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
| 8 | 8 |
| 9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
| 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| (...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3362 if (!core_->state().server_cert) { | 3362 if (!core_->state().server_cert) { |
| 3363 server_cert_verify_result_.Reset(); | 3363 server_cert_verify_result_.Reset(); |
| 3364 server_cert_verify_result_.cert_status = CERT_STATUS_INVALID; | 3364 server_cert_verify_result_.cert_status = CERT_STATUS_INVALID; |
| 3365 return ERR_CERT_INVALID; | 3365 return ERR_CERT_INVALID; |
| 3366 } | 3366 } |
| 3367 | 3367 |
| 3368 start_cert_verification_time_ = base::TimeTicks::Now(); | 3368 start_cert_verification_time_ = base::TimeTicks::Now(); |
| 3369 | 3369 |
| 3370 int flags = 0; | 3370 int flags = 0; |
| 3371 if (ssl_config_.rev_checking_enabled) | 3371 if (ssl_config_.rev_checking_enabled) |
| 3372 flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED; | 3372 flags |= CertVerifier::VERIFY_REV_CHECKING_ENABLED; |
| 3373 if (ssl_config_.verify_ev_cert) | 3373 if (ssl_config_.verify_ev_cert) |
| 3374 flags |= X509Certificate::VERIFY_EV_CERT; | 3374 flags |= CertVerifier::VERIFY_EV_CERT; |
| 3375 if (ssl_config_.cert_io_enabled) | 3375 if (ssl_config_.cert_io_enabled) |
| 3376 flags |= X509Certificate::VERIFY_CERT_IO_ENABLED; | 3376 flags |= CertVerifier::VERIFY_CERT_IO_ENABLED; |
| 3377 verifier_.reset(new SingleRequestCertVerifier(cert_verifier_)); | 3377 verifier_.reset(new SingleRequestCertVerifier(cert_verifier_)); |
| 3378 return verifier_->Verify( | 3378 return verifier_->Verify( |
| 3379 core_->state().server_cert, host_and_port_.host(), flags, | 3379 core_->state().server_cert, host_and_port_.host(), flags, |
| 3380 SSLConfigService::GetCRLSet(), &server_cert_verify_result_, | 3380 SSLConfigService::GetCRLSet(), &server_cert_verify_result_, |
| 3381 base::Bind(&SSLClientSocketNSS::OnHandshakeIOComplete, | 3381 base::Bind(&SSLClientSocketNSS::OnHandshakeIOComplete, |
| 3382 base::Unretained(this)), | 3382 base::Unretained(this)), |
| 3383 net_log_); | 3383 net_log_); |
| 3384 } | 3384 } |
| 3385 | 3385 |
| 3386 // Derived from AuthCertificateCallback() in | 3386 // Derived from AuthCertificateCallback() in |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 EnsureThreadIdAssigned(); | 3508 EnsureThreadIdAssigned(); |
| 3509 base::AutoLock auto_lock(lock_); | 3509 base::AutoLock auto_lock(lock_); |
| 3510 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 3510 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
| 3511 } | 3511 } |
| 3512 | 3512 |
| 3513 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { | 3513 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { |
| 3514 return server_bound_cert_service_; | 3514 return server_bound_cert_service_; |
| 3515 } | 3515 } |
| 3516 | 3516 |
| 3517 } // namespace net | 3517 } // namespace net |
| OLD | NEW |