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 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2676 return transport_->socket()->SetSendBufferSize(size); | 2676 return transport_->socket()->SetSendBufferSize(size); |
2677 } | 2677 } |
2678 | 2678 |
2679 int SSLClientSocketNSS::Init() { | 2679 int SSLClientSocketNSS::Init() { |
2680 EnterFunction(""); | 2680 EnterFunction(""); |
2681 // Initialize the NSS SSL library in a threadsafe way. This also | 2681 // Initialize the NSS SSL library in a threadsafe way. This also |
2682 // initializes the NSS base library. | 2682 // initializes the NSS base library. |
2683 EnsureNSSSSLInit(); | 2683 EnsureNSSSSLInit(); |
2684 if (!NSS_IsInitialized()) | 2684 if (!NSS_IsInitialized()) |
2685 return ERR_UNEXPECTED; | 2685 return ERR_UNEXPECTED; |
2686 #if defined(USE_NSS_CERTS) || defined(OS_IOS) | 2686 #if defined(USE_NSS_VERIFIER) |
2687 if (ssl_config_.cert_io_enabled) { | 2687 if (ssl_config_.cert_io_enabled) { |
2688 // We must call EnsureNSSHttpIOInit() here, on the IO thread, to get the IO | 2688 // We must call EnsureNSSHttpIOInit() here, on the IO thread, to get the IO |
2689 // loop by MessageLoopForIO::current(). | 2689 // loop by MessageLoopForIO::current(). |
2690 // X509Certificate::Verify() runs on a worker thread of CertVerifier. | 2690 // X509Certificate::Verify() runs on a worker thread of CertVerifier. |
2691 EnsureNSSHttpIOInit(); | 2691 EnsureNSSHttpIOInit(); |
2692 } | 2692 } |
2693 #endif | 2693 #endif |
2694 | 2694 |
2695 LeaveFunction(""); | 2695 LeaveFunction(""); |
2696 return OK; | 2696 return OK; |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3211 return core_->GetChannelIDKey(); | 3211 return core_->GetChannelIDKey(); |
3212 } | 3212 } |
3213 | 3213 |
3214 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { | 3214 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { |
3215 if (completed_handshake_) | 3215 if (completed_handshake_) |
3216 return SSL_FAILURE_NONE; | 3216 return SSL_FAILURE_NONE; |
3217 return SSL_FAILURE_UNKNOWN; | 3217 return SSL_FAILURE_UNKNOWN; |
3218 } | 3218 } |
3219 | 3219 |
3220 } // namespace net | 3220 } // namespace net |
OLD | NEW |