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

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

Issue 11293235: Ensure that NSS HTTP IO is initialized on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 return transport_->socket()->SetSendBufferSize(size); 3087 return transport_->socket()->SetSendBufferSize(size);
3088 } 3088 }
3089 3089
3090 int SSLClientSocketNSS::Init() { 3090 int SSLClientSocketNSS::Init() {
3091 EnterFunction(""); 3091 EnterFunction("");
3092 // Initialize the NSS SSL library in a threadsafe way. This also 3092 // Initialize the NSS SSL library in a threadsafe way. This also
3093 // initializes the NSS base library. 3093 // initializes the NSS base library.
3094 EnsureNSSSSLInit(); 3094 EnsureNSSSSLInit();
3095 if (!NSS_IsInitialized()) 3095 if (!NSS_IsInitialized())
3096 return ERR_UNEXPECTED; 3096 return ERR_UNEXPECTED;
3097 #if !defined(OS_MACOSX) && !defined(OS_WIN) 3097 #if (!defined(OS_MACOSX) && !defined(OS_WIN)) || defined(OS_IOS)
Ryan Sleevi 2012/11/12 21:45:46 Let's change this to the positive form #if define
blundell 2012/11/12 21:58:44 Done.
3098 if (ssl_config_.cert_io_enabled) { 3098 if (ssl_config_.cert_io_enabled) {
3099 // We must call EnsureNSSHttpIOInit() here, on the IO thread, to get the IO 3099 // We must call EnsureNSSHttpIOInit() here, on the IO thread, to get the IO
3100 // loop by MessageLoopForIO::current(). 3100 // loop by MessageLoopForIO::current().
3101 // X509Certificate::Verify() runs on a worker thread of CertVerifier. 3101 // X509Certificate::Verify() runs on a worker thread of CertVerifier.
3102 EnsureNSSHttpIOInit(); 3102 EnsureNSSHttpIOInit();
3103 } 3103 }
3104 #endif 3104 #endif
3105 3105
3106 LeaveFunction(""); 3106 LeaveFunction("");
3107 return OK; 3107 return OK;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 EnsureThreadIdAssigned(); 3564 EnsureThreadIdAssigned();
3565 base::AutoLock auto_lock(lock_); 3565 base::AutoLock auto_lock(lock_);
3566 return valid_thread_id_ == base::PlatformThread::CurrentId(); 3566 return valid_thread_id_ == base::PlatformThread::CurrentId();
3567 } 3567 }
3568 3568
3569 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { 3569 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const {
3570 return server_bound_cert_service_; 3570 return server_bound_cert_service_;
3571 } 3571 }
3572 3572
3573 } // namespace net 3573 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698