OLD | NEW |
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 Loading... |
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(USE_NSS) || defined(OS_IOS) |
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 Loading... |
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 |
OLD | NEW |