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

Side by Side Diff: net/socket/ssl_client_socket_nss.cc

Issue 9478016: Merge 123620 - Set SSLInfo.client_cert_sent when origin bound cert was sent. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_mac.cc ('k') | net/socket/ssl_client_socket_openssl.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 (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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 ssl_info->cert = server_cert_; 493 ssl_info->cert = server_cert_;
494 ssl_info->connection_status = ssl_connection_status_; 494 ssl_info->connection_status = ssl_connection_status_;
495 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes; 495 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes;
496 for (std::vector<SHA1Fingerprint>::const_iterator 496 for (std::vector<SHA1Fingerprint>::const_iterator
497 i = side_pinned_public_keys_.begin(); 497 i = side_pinned_public_keys_.begin();
498 i != side_pinned_public_keys_.end(); i++) { 498 i != side_pinned_public_keys_.end(); i++) {
499 ssl_info->public_key_hashes.push_back(*i); 499 ssl_info->public_key_hashes.push_back(*i);
500 } 500 }
501 ssl_info->is_issued_by_known_root = 501 ssl_info->is_issued_by_known_root =
502 server_cert_verify_result_->is_issued_by_known_root; 502 server_cert_verify_result_->is_issued_by_known_root;
503 ssl_info->client_cert_sent = 503 ssl_info->client_cert_sent = WasOriginBoundCertSent() ||
504 ssl_config_.send_client_cert && ssl_config_.client_cert; 504 (ssl_config_.send_client_cert && ssl_config_.client_cert);
505 505
506 PRUint16 cipher_suite = 506 PRUint16 cipher_suite =
507 SSLConnectionStatusToCipherSuite(ssl_connection_status_); 507 SSLConnectionStatusToCipherSuite(ssl_connection_status_);
508 SSLCipherSuiteInfo cipher_info; 508 SSLCipherSuiteInfo cipher_info;
509 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite, 509 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite,
510 &cipher_info, sizeof(cipher_info)); 510 &cipher_info, sizeof(cipher_info));
511 if (ok == SECSuccess) { 511 if (ok == SECSuccess) {
512 ssl_info->security_bits = cipher_info.effectiveKeyBits; 512 ssl_info->security_bits = cipher_info.effectiveKeyBits;
513 } else { 513 } else {
514 ssl_info->security_bits = -1; 514 ssl_info->security_bits = -1;
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 valid_thread_id_ = base::PlatformThread::CurrentId(); 2715 valid_thread_id_ = base::PlatformThread::CurrentId();
2716 } 2716 }
2717 2717
2718 bool SSLClientSocketNSS::CalledOnValidThread() const { 2718 bool SSLClientSocketNSS::CalledOnValidThread() const {
2719 EnsureThreadIdAssigned(); 2719 EnsureThreadIdAssigned();
2720 base::AutoLock auto_lock(lock_); 2720 base::AutoLock auto_lock(lock_);
2721 return valid_thread_id_ == base::PlatformThread::CurrentId(); 2721 return valid_thread_id_ == base::PlatformThread::CurrentId();
2722 } 2722 }
2723 2723
2724 } // namespace net 2724 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_mac.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698