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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
813 } | 813 } |
814 | 814 |
815 int SSLClientSocketNSS::Init() { | 815 int SSLClientSocketNSS::Init() { |
816 EnterFunction(""); | 816 EnterFunction(""); |
817 // Initialize the NSS SSL library in a threadsafe way. This also | 817 // Initialize the NSS SSL library in a threadsafe way. This also |
818 // initializes the NSS base library. | 818 // initializes the NSS base library. |
819 EnsureNSSSSLInit(); | 819 EnsureNSSSSLInit(); |
820 if (!NSS_IsInitialized()) | 820 if (!NSS_IsInitialized()) |
821 return ERR_UNEXPECTED; | 821 return ERR_UNEXPECTED; |
822 #if !defined(OS_MACOSX) && !defined(OS_WIN) | 822 #if !defined(OS_MACOSX) && !defined(OS_WIN) |
823 if (ssl_config_.rev_checking_enabled) { | 823 // We must call EnsureNssPkixIOInit() here, on the IO thread, to get the IO |
wtc
2012/03/12 22:38:11
Just to confirm: the removal of this "if" is the b
agl
2012/03/13 15:14:05
Yep.
| |
824 // We must call EnsureOCSPInit() here, on the IO thread, to get the IO loop | 824 // loop by MessageLoopForIO::current(). |
825 // by MessageLoopForIO::current(). | 825 // X509Certificate::Verify() runs on a worker thread of CertVerifier. |
826 // X509Certificate::Verify() runs on a worker thread of CertVerifier. | 826 EnsureNssPkixIOInit(); |
827 EnsureOCSPInit(); | |
828 } | |
829 #endif | 827 #endif |
830 | 828 |
831 LeaveFunction(""); | 829 LeaveFunction(""); |
832 return OK; | 830 return OK; |
833 } | 831 } |
834 | 832 |
835 int SSLClientSocketNSS::InitializeSSLOptions() { | 833 int SSLClientSocketNSS::InitializeSSLOptions() { |
836 // Transport connected, now hook it up to nss | 834 // Transport connected, now hook it up to nss |
837 // TODO(port): specify rx and tx buffer sizes separately | 835 // TODO(port): specify rx and tx buffer sizes separately |
838 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); | 836 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2706 EnsureThreadIdAssigned(); | 2704 EnsureThreadIdAssigned(); |
2707 base::AutoLock auto_lock(lock_); | 2705 base::AutoLock auto_lock(lock_); |
2708 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 2706 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
2709 } | 2707 } |
2710 | 2708 |
2711 OriginBoundCertService* SSLClientSocketNSS::GetOriginBoundCertService() const { | 2709 OriginBoundCertService* SSLClientSocketNSS::GetOriginBoundCertService() const { |
2712 return origin_bound_cert_service_; | 2710 return origin_bound_cert_service_; |
2713 } | 2711 } |
2714 | 2712 |
2715 } // namespace net | 2713 } // namespace net |
OLD | NEW |