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

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

Issue 6874039: Return the constructed certificate chain in X509Certificate::Verify() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ensure the EE cert is marked as a TLS server cert, not a CA cert Created 9 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 | Annotate | Revision Log
OLDNEW
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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 506
507 // static 507 // static
508 void SSLClientSocketNSS::ClearSessionCache() { 508 void SSLClientSocketNSS::ClearSessionCache() {
509 SSL_ClearSessionCache(); 509 SSL_ClearSessionCache();
510 } 510 }
511 511
512 void SSLClientSocketNSS::GetSSLInfo(SSLInfo* ssl_info) { 512 void SSLClientSocketNSS::GetSSLInfo(SSLInfo* ssl_info) {
513 EnterFunction(""); 513 EnterFunction("");
514 ssl_info->Reset(); 514 ssl_info->Reset();
515 515 if (!server_cert_verify_result_->verified_cert) {
516 if (!server_cert_) 516 NOTREACHED();
517 return; 517 return;
518 }
518 519
519 ssl_info->cert_status = server_cert_verify_result_->cert_status; 520 ssl_info->cert_status = server_cert_verify_result_->cert_status;
520 DCHECK(server_cert_ != NULL); 521 ssl_info->cert = server_cert_verify_result_->verified_cert;
521 ssl_info->cert = server_cert_;
522 ssl_info->connection_status = ssl_connection_status_; 522 ssl_info->connection_status = ssl_connection_status_;
523 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes; 523 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes;
524 ssl_info->is_issued_by_known_root = 524 ssl_info->is_issued_by_known_root =
525 server_cert_verify_result_->is_issued_by_known_root; 525 server_cert_verify_result_->is_issued_by_known_root;
526 526
527 PRUint16 cipher_suite = 527 PRUint16 cipher_suite =
528 SSLConnectionStatusToCipherSuite(ssl_connection_status_); 528 SSLConnectionStatusToCipherSuite(ssl_connection_status_);
529 SSLCipherSuiteInfo cipher_info; 529 SSLCipherSuiteInfo cipher_info;
530 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite, 530 SECStatus ok = SSL_GetCipherSuiteInfo(cipher_suite,
531 &cipher_info, sizeof(cipher_info)); 531 &cipher_info, sizeof(cipher_info));
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 valid_thread_id_ = base::PlatformThread::CurrentId(); 2260 valid_thread_id_ = base::PlatformThread::CurrentId();
2261 } 2261 }
2262 2262
2263 bool SSLClientSocketNSS::CalledOnValidThread() const { 2263 bool SSLClientSocketNSS::CalledOnValidThread() const {
2264 EnsureThreadIdAssigned(); 2264 EnsureThreadIdAssigned();
2265 base::AutoLock auto_lock(lock_); 2265 base::AutoLock auto_lock(lock_);
2266 return valid_thread_id_ == base::PlatformThread::CurrentId(); 2266 return valid_thread_id_ == base::PlatformThread::CurrentId();
2267 } 2267 }
2268 2268
2269 } // namespace net 2269 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698