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

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

Issue 10836150: Revert 150375 - Implement SHA-256 fingerprint support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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_nss.h ('k') | net/url_request/url_request_unittest.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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // set on Windows XP without error. There is some overhead from the server 124 // set on Windows XP without error. There is some overhead from the server
125 // sending the OCSP response if it supports the extension, for the subset of 125 // sending the OCSP response if it supports the extension, for the subset of
126 // XP clients who will request it but be unable to use it, but this is an 126 // XP clients who will request it but be unable to use it, but this is an
127 // acceptable trade-off for simplicity of implementation. 127 // acceptable trade-off for simplicity of implementation.
128 static bool IsOCSPStaplingSupported() { 128 static bool IsOCSPStaplingSupported() {
129 return true; 129 return true;
130 } 130 }
131 #elif defined(USE_NSS) 131 #elif defined(USE_NSS)
132 typedef SECStatus 132 typedef SECStatus
133 (*CacheOCSPResponseFromSideChannelFunction)( 133 (*CacheOCSPResponseFromSideChannelFunction)(
134 CERTCertDBHandle* handle, CERTCertificate* cert, PRTime time, 134 CERTCertDBHandle *handle, CERTCertificate *cert, PRTime time,
135 SECItem* encodedResponse, void* pwArg); 135 SECItem *encodedResponse, void *pwArg);
136 136
137 // On Linux, we dynamically link against the system version of libnss3.so. In 137 // On Linux, we dynamically link against the system version of libnss3.so. In
138 // order to continue working on systems without up-to-date versions of NSS we 138 // order to continue working on systems without up-to-date versions of NSS we
139 // lookup CERT_CacheOCSPResponseFromSideChannel with dlsym. 139 // lookup CERT_CacheOCSPResponseFromSideChannel with dlsym.
140 140
141 // RuntimeLibNSSFunctionPointers is a singleton which caches the results of any 141 // RuntimeLibNSSFunctionPointers is a singleton which caches the results of any
142 // runtime symbol resolution that we need. 142 // runtime symbol resolution that we need.
143 class RuntimeLibNSSFunctionPointers { 143 class RuntimeLibNSSFunctionPointers {
144 public: 144 public:
145 CacheOCSPResponseFromSideChannelFunction 145 CacheOCSPResponseFromSideChannelFunction
(...skipping 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 if (core_->state().server_cert_chain.empty() || 2756 if (core_->state().server_cert_chain.empty() ||
2757 !core_->state().server_cert_chain[0]) { 2757 !core_->state().server_cert_chain[0]) {
2758 return false; 2758 return false;
2759 } 2759 }
2760 2760
2761 ssl_info->cert_status = server_cert_verify_result_.cert_status; 2761 ssl_info->cert_status = server_cert_verify_result_.cert_status;
2762 ssl_info->cert = server_cert_verify_result_.verified_cert; 2762 ssl_info->cert = server_cert_verify_result_.verified_cert;
2763 ssl_info->connection_status = 2763 ssl_info->connection_status =
2764 core_->state().ssl_connection_status; 2764 core_->state().ssl_connection_status;
2765 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; 2765 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes;
2766 // TODO(palmer) TODO(agl): Do side pins need to be in both SHA1 and SHA256 2766 for (std::vector<SHA1Fingerprint>::const_iterator
2767 // forms? If consumers of side pins only care about SHA1, it is OK to put 2767 i = side_pinned_public_keys_.begin();
2768 // them only in the HASH_VALUE_SHA1 vector. 2768 i != side_pinned_public_keys_.end(); i++) {
2769 HashValueVector& sha1_hashes = 2769 ssl_info->public_key_hashes.push_back(*i);
2770 ssl_info->public_key_hashes[HASH_VALUE_SHA1];
2771 for (HashValueVector::const_iterator i = side_pinned_public_keys_.begin();
2772 i != side_pinned_public_keys_.end(); ++i) {
2773 sha1_hashes.push_back(*i);
2774 } 2770 }
2775 ssl_info->is_issued_by_known_root = 2771 ssl_info->is_issued_by_known_root =
2776 server_cert_verify_result_.is_issued_by_known_root; 2772 server_cert_verify_result_.is_issued_by_known_root;
2777 ssl_info->client_cert_sent = 2773 ssl_info->client_cert_sent =
2778 ssl_config_.send_client_cert && ssl_config_.client_cert; 2774 ssl_config_.send_client_cert && ssl_config_.client_cert;
2779 ssl_info->channel_id_sent = WasChannelIDSent(); 2775 ssl_info->channel_id_sent = WasChannelIDSent();
2780 2776
2781 PRUint16 cipher_suite = SSLConnectionStatusToCipherSuite( 2777 PRUint16 cipher_suite = SSLConnectionStatusToCipherSuite(
2782 core_->state().ssl_connection_status); 2778 core_->state().ssl_connection_status);
2783 SSLCipherSuiteInfo cipher_info; 2779 SSLCipherSuiteInfo cipher_info;
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
3512 EnsureThreadIdAssigned(); 3508 EnsureThreadIdAssigned();
3513 base::AutoLock auto_lock(lock_); 3509 base::AutoLock auto_lock(lock_);
3514 return valid_thread_id_ == base::PlatformThread::CurrentId(); 3510 return valid_thread_id_ == base::PlatformThread::CurrentId();
3515 } 3511 }
3516 3512
3517 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { 3513 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const {
3518 return server_bound_cert_service_; 3514 return server_bound_cert_service_;
3519 } 3515 }
3520 3516
3521 } // namespace net 3517 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698