| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 ssl_info->cert = server_cert_; | 492 ssl_info->cert = server_cert_; |
| 493 ssl_info->connection_status = ssl_connection_status_; | 493 ssl_info->connection_status = ssl_connection_status_; |
| 494 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes; | 494 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes; |
| 495 for (std::vector<SHA1Fingerprint>::const_iterator | 495 for (std::vector<SHA1Fingerprint>::const_iterator |
| 496 i = side_pinned_public_keys_.begin(); | 496 i = side_pinned_public_keys_.begin(); |
| 497 i != side_pinned_public_keys_.end(); i++) { | 497 i != side_pinned_public_keys_.end(); i++) { |
| 498 ssl_info->public_key_hashes.push_back(*i); | 498 ssl_info->public_key_hashes.push_back(*i); |
| 499 } | 499 } |
| 500 ssl_info->is_issued_by_known_root = | 500 ssl_info->is_issued_by_known_root = |
| 501 server_cert_verify_result_->is_issued_by_known_root; | 501 server_cert_verify_result_->is_issued_by_known_root; |
| 502 ssl_info->client_cert_sent = |
| 503 ssl_config_.send_client_cert && ssl_config_.client_cert; |
| 502 | 504 |
| 503 PRUint16 cipher_suite = | 505 PRUint16 cipher_suite = |
| 504 SSLConnectionStatusToCipherSuite(ssl_connection_status_); | 506 SSLConnectionStatusToCipherSuite(ssl_connection_status_); |
| 505 SSLCipherSuiteInfo cipher_info; | 507 SSLCipherSuiteInfo cipher_info; |
| 506 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite, | 508 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite, |
| 507 &cipher_info, sizeof(cipher_info)); | 509 &cipher_info, sizeof(cipher_info)); |
| 508 if (ok == SECSuccess) { | 510 if (ok == SECSuccess) { |
| 509 ssl_info->security_bits = cipher_info.effectiveKeyBits; | 511 ssl_info->security_bits = cipher_info.effectiveKeyBits; |
| 510 } else { | 512 } else { |
| 511 ssl_info->security_bits = -1; | 513 ssl_info->security_bits = -1; |
| (...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2597 valid_thread_id_ = base::PlatformThread::CurrentId(); | 2599 valid_thread_id_ = base::PlatformThread::CurrentId(); |
| 2598 } | 2600 } |
| 2599 | 2601 |
| 2600 bool SSLClientSocketNSS::CalledOnValidThread() const { | 2602 bool SSLClientSocketNSS::CalledOnValidThread() const { |
| 2601 EnsureThreadIdAssigned(); | 2603 EnsureThreadIdAssigned(); |
| 2602 base::AutoLock auto_lock(lock_); | 2604 base::AutoLock auto_lock(lock_); |
| 2603 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 2605 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
| 2604 } | 2606 } |
| 2605 | 2607 |
| 2606 } // namespace net | 2608 } // namespace net |
| OLD | NEW |