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

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

Issue 10545166: Support SHA-256 in public key pins for HTTPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 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 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 if (core_->state().server_cert_chain.empty() || 2840 if (core_->state().server_cert_chain.empty() ||
2841 !core_->state().server_cert_chain[0]) { 2841 !core_->state().server_cert_chain[0]) {
2842 return; 2842 return;
2843 } 2843 }
2844 2844
2845 ssl_info->cert_status = server_cert_verify_result_->cert_status; 2845 ssl_info->cert_status = server_cert_verify_result_->cert_status;
2846 ssl_info->cert = server_cert_verify_result_->verified_cert; 2846 ssl_info->cert = server_cert_verify_result_->verified_cert;
2847 ssl_info->connection_status = 2847 ssl_info->connection_status =
2848 core_->state().ssl_connection_status; 2848 core_->state().ssl_connection_status;
2849 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes; 2849 ssl_info->public_key_hashes = server_cert_verify_result_->public_key_hashes;
2850 for (std::vector<SHA1Fingerprint>::const_iterator 2850 for (std::vector<Fingerprint>::const_iterator
2851 i = side_pinned_public_keys_.begin(); 2851 i = side_pinned_public_keys_.begin();
2852 i != side_pinned_public_keys_.end(); i++) { 2852 i != side_pinned_public_keys_.end(); i++) {
2853 ssl_info->public_key_hashes.push_back(*i); 2853 ssl_info->public_key_hashes.push_back(*i);
2854 } 2854 }
2855 ssl_info->is_issued_by_known_root = 2855 ssl_info->is_issued_by_known_root =
2856 server_cert_verify_result_->is_issued_by_known_root; 2856 server_cert_verify_result_->is_issued_by_known_root;
2857 ssl_info->client_cert_sent = WasDomainBoundCertSent() || 2857 ssl_info->client_cert_sent = WasDomainBoundCertSent() ||
2858 (ssl_config_.send_client_cert && ssl_config_.client_cert); 2858 (ssl_config_.send_client_cert && ssl_config_.client_cert);
2859 2859
2860 PRUint16 cipher_suite = SSLConnectionStatusToCipherSuite( 2860 PRUint16 cipher_suite = SSLConnectionStatusToCipherSuite(
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3696 EnsureThreadIdAssigned(); 3696 EnsureThreadIdAssigned();
3697 base::AutoLock auto_lock(lock_); 3697 base::AutoLock auto_lock(lock_);
3698 return valid_thread_id_ == base::PlatformThread::CurrentId(); 3698 return valid_thread_id_ == base::PlatformThread::CurrentId();
3699 } 3699 }
3700 3700
3701 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { 3701 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const {
3702 return server_bound_cert_service_; 3702 return server_bound_cert_service_;
3703 } 3703 }
3704 3704
3705 } // namespace net 3705 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698