| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include <limits> | 64 #include <limits> |
| 65 #include <map> | 65 #include <map> |
| 66 | 66 |
| 67 #include "base/bind.h" | 67 #include "base/bind.h" |
| 68 #include "base/bind_helpers.h" | 68 #include "base/bind_helpers.h" |
| 69 #include "base/callback_helpers.h" | 69 #include "base/callback_helpers.h" |
| 70 #include "base/compiler_specific.h" | 70 #include "base/compiler_specific.h" |
| 71 #include "base/logging.h" | 71 #include "base/logging.h" |
| 72 #include "base/memory/singleton.h" | 72 #include "base/memory/singleton.h" |
| 73 #include "base/metrics/histogram.h" | 73 #include "base/metrics/histogram.h" |
| 74 #include "base/profiler/scoped_profile.h" | 74 #include "base/profiler/scoped_tracker.h" |
| 75 #include "base/single_thread_task_runner.h" | 75 #include "base/single_thread_task_runner.h" |
| 76 #include "base/stl_util.h" | 76 #include "base/stl_util.h" |
| 77 #include "base/strings/string_number_conversions.h" | 77 #include "base/strings/string_number_conversions.h" |
| 78 #include "base/strings/string_util.h" | 78 #include "base/strings/string_util.h" |
| 79 #include "base/strings/stringprintf.h" | 79 #include "base/strings/stringprintf.h" |
| 80 #include "base/thread_task_runner_handle.h" | 80 #include "base/thread_task_runner_handle.h" |
| 81 #include "base/threading/thread_restrictions.h" | 81 #include "base/threading/thread_restrictions.h" |
| 82 #include "base/values.h" | 82 #include "base/values.h" |
| 83 #include "crypto/ec_private_key.h" | 83 #include "crypto/ec_private_key.h" |
| 84 #include "crypto/nss_util.h" | 84 #include "crypto/nss_util.h" |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 CertSetCertificateContextProperty( | 1682 CertSetCertificateContextProperty( |
| 1683 ssl_config_.client_cert->os_cert_handle(), | 1683 ssl_config_.client_cert->os_cert_handle(), |
| 1684 CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); | 1684 CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); |
| 1685 } | 1685 } |
| 1686 #endif | 1686 #endif |
| 1687 | 1687 |
| 1688 return net_error; | 1688 return net_error; |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 int SSLClientSocketNSS::Core::DoHandshakeLoop(int last_io_result) { | 1691 int SSLClientSocketNSS::Core::DoHandshakeLoop(int last_io_result) { |
| 1692 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 1692 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 1693 tracked_objects::ScopedProfile tracking_profile( | 1693 tracked_objects::ScopedTracker tracking_profile( |
| 1694 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1694 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1695 "424386 SSLClientSocketNSS::Core::DoHandshakeLoop")); | 1695 "424386 SSLClientSocketNSS::Core::DoHandshakeLoop")); |
| 1696 | 1696 |
| 1697 DCHECK(OnNSSTaskRunner()); | 1697 DCHECK(OnNSSTaskRunner()); |
| 1698 | 1698 |
| 1699 int rv = last_io_result; | 1699 int rv = last_io_result; |
| 1700 do { | 1700 do { |
| 1701 // Default to STATE_NONE for next state. | 1701 // Default to STATE_NONE for next state. |
| 1702 State state = next_handshake_state_; | 1702 State state = next_handshake_state_; |
| 1703 GotoState(STATE_NONE); | 1703 GotoState(STATE_NONE); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1723 // special case we keep looping even if rv is ERR_IO_PENDING because | 1723 // special case we keep looping even if rv is ERR_IO_PENDING because |
| 1724 // the transport IO may allow DoHandshake to make progress. | 1724 // the transport IO may allow DoHandshake to make progress. |
| 1725 DCHECK(rv == OK || rv == ERR_IO_PENDING); | 1725 DCHECK(rv == OK || rv == ERR_IO_PENDING); |
| 1726 rv = OK; // This causes us to stay in the loop. | 1726 rv = OK; // This causes us to stay in the loop. |
| 1727 } | 1727 } |
| 1728 } while (rv != ERR_IO_PENDING && next_handshake_state_ != STATE_NONE); | 1728 } while (rv != ERR_IO_PENDING && next_handshake_state_ != STATE_NONE); |
| 1729 return rv; | 1729 return rv; |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 int SSLClientSocketNSS::Core::DoReadLoop(int result) { | 1732 int SSLClientSocketNSS::Core::DoReadLoop(int result) { |
| 1733 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 1733 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 1734 tracked_objects::ScopedProfile tracking_profile( | 1734 tracked_objects::ScopedTracker tracking_profile( |
| 1735 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1735 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1736 "424386 SSLClientSocketNSS::Core::DoReadLoop")); | 1736 "424386 SSLClientSocketNSS::Core::DoReadLoop")); |
| 1737 | 1737 |
| 1738 DCHECK(OnNSSTaskRunner()); | 1738 DCHECK(OnNSSTaskRunner()); |
| 1739 DCHECK(false_started_ || handshake_callback_called_); | 1739 DCHECK(false_started_ || handshake_callback_called_); |
| 1740 DCHECK_EQ(STATE_NONE, next_handshake_state_); | 1740 DCHECK_EQ(STATE_NONE, next_handshake_state_); |
| 1741 | 1741 |
| 1742 if (result < 0) | 1742 if (result < 0) |
| 1743 return result; | 1743 return result; |
| 1744 | 1744 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 do { | 1787 do { |
| 1788 rv = DoPayloadWrite(); | 1788 rv = DoPayloadWrite(); |
| 1789 network_moved = DoTransportIO(); | 1789 network_moved = DoTransportIO(); |
| 1790 } while (rv == ERR_IO_PENDING && network_moved); | 1790 } while (rv == ERR_IO_PENDING && network_moved); |
| 1791 | 1791 |
| 1792 LeaveFunction(rv); | 1792 LeaveFunction(rv); |
| 1793 return rv; | 1793 return rv; |
| 1794 } | 1794 } |
| 1795 | 1795 |
| 1796 int SSLClientSocketNSS::Core::DoHandshake() { | 1796 int SSLClientSocketNSS::Core::DoHandshake() { |
| 1797 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 1797 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 1798 tracked_objects::ScopedProfile tracking_profile( | 1798 tracked_objects::ScopedTracker tracking_profile( |
| 1799 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1799 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1800 "424386 SSLClientSocketNSS::Core::DoHandshake")); | 1800 "424386 SSLClientSocketNSS::Core::DoHandshake")); |
| 1801 | 1801 |
| 1802 DCHECK(OnNSSTaskRunner()); | 1802 DCHECK(OnNSSTaskRunner()); |
| 1803 | 1803 |
| 1804 int net_error = OK; | 1804 int net_error = OK; |
| 1805 SECStatus rv = SSL_ForceHandshake(nss_fd_); | 1805 SECStatus rv = SSL_ForceHandshake(nss_fd_); |
| 1806 | 1806 |
| 1807 // Note: this function may be called multiple times during the handshake, so | 1807 // Note: this function may be called multiple times during the handshake, so |
| 1808 // even though channel id and client auth are separate else cases, they can | 1808 // even though channel id and client auth are separate else cases, they can |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 base::Bind(&AddLogEventWithCallback, weak_net_log_, | 1843 base::Bind(&AddLogEventWithCallback, weak_net_log_, |
| 1844 NetLog::TYPE_SSL_HANDSHAKE_ERROR, | 1844 NetLog::TYPE_SSL_HANDSHAKE_ERROR, |
| 1845 CreateNetLogSSLErrorCallback(net_error, prerr))); | 1845 CreateNetLogSSLErrorCallback(net_error, prerr))); |
| 1846 } | 1846 } |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 return net_error; | 1849 return net_error; |
| 1850 } | 1850 } |
| 1851 | 1851 |
| 1852 int SSLClientSocketNSS::Core::DoGetDBCertComplete(int result) { | 1852 int SSLClientSocketNSS::Core::DoGetDBCertComplete(int result) { |
| 1853 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 1853 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 1854 tracked_objects::ScopedProfile tracking_profile( | 1854 tracked_objects::ScopedTracker tracking_profile( |
| 1855 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1855 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1856 "424386 SSLClientSocketNSS::Core::DoGetDBCertComplete")); | 1856 "424386 SSLClientSocketNSS::Core::DoGetDBCertComplete")); |
| 1857 | 1857 |
| 1858 SECStatus rv; | 1858 SECStatus rv; |
| 1859 PostOrRunCallback( | 1859 PostOrRunCallback( |
| 1860 FROM_HERE, | 1860 FROM_HERE, |
| 1861 base::Bind(&BoundNetLog::EndEventWithNetErrorCode, weak_net_log_, | 1861 base::Bind(&BoundNetLog::EndEventWithNetErrorCode, weak_net_log_, |
| 1862 NetLog::TYPE_SSL_GET_DOMAIN_BOUND_CERT, result)); | 1862 NetLog::TYPE_SSL_GET_DOMAIN_BOUND_CERT, result)); |
| 1863 | 1863 |
| 1864 channel_id_needed_ = false; | 1864 channel_id_needed_ = false; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 base::Bind(&AddLogEventWithCallback, weak_net_log_, | 2032 base::Bind(&AddLogEventWithCallback, weak_net_log_, |
| 2033 NetLog::TYPE_SSL_WRITE_ERROR, | 2033 NetLog::TYPE_SSL_WRITE_ERROR, |
| 2034 CreateNetLogSSLErrorCallback(rv, prerr))); | 2034 CreateNetLogSSLErrorCallback(rv, prerr))); |
| 2035 return rv; | 2035 return rv; |
| 2036 } | 2036 } |
| 2037 | 2037 |
| 2038 // Do as much network I/O as possible between the buffer and the | 2038 // Do as much network I/O as possible between the buffer and the |
| 2039 // transport socket. Return true if some I/O performed, false | 2039 // transport socket. Return true if some I/O performed, false |
| 2040 // otherwise (error or ERR_IO_PENDING). | 2040 // otherwise (error or ERR_IO_PENDING). |
| 2041 bool SSLClientSocketNSS::Core::DoTransportIO() { | 2041 bool SSLClientSocketNSS::Core::DoTransportIO() { |
| 2042 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 2042 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 2043 tracked_objects::ScopedProfile tracking_profile( | 2043 tracked_objects::ScopedTracker tracking_profile( |
| 2044 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2044 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2045 "424386 SSLClientSocketNSS::Core::DoTransportIO")); | 2045 "424386 SSLClientSocketNSS::Core::DoTransportIO")); |
| 2046 | 2046 |
| 2047 DCHECK(OnNSSTaskRunner()); | 2047 DCHECK(OnNSSTaskRunner()); |
| 2048 | 2048 |
| 2049 bool network_moved = false; | 2049 bool network_moved = false; |
| 2050 if (nss_bufs_ != NULL) { | 2050 if (nss_bufs_ != NULL) { |
| 2051 int rv; | 2051 int rv; |
| 2052 // Read and write as much data as we can. The loop is neccessary | 2052 // Read and write as much data as we can. The loop is neccessary |
| 2053 // because Write() may return synchronously. | 2053 // because Write() may return synchronously. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2213 DoWriteCallback(rv_write); | 2213 DoWriteCallback(rv_write); |
| 2214 } | 2214 } |
| 2215 | 2215 |
| 2216 // As part of Connect(), the SSLClientSocketNSS object performs an SSL | 2216 // As part of Connect(), the SSLClientSocketNSS object performs an SSL |
| 2217 // handshake. This requires network IO, which in turn calls | 2217 // handshake. This requires network IO, which in turn calls |
| 2218 // BufferRecvComplete() with a non-zero byte count. This byte count eventually | 2218 // BufferRecvComplete() with a non-zero byte count. This byte count eventually |
| 2219 // winds its way through the state machine and ends up being passed to the | 2219 // winds its way through the state machine and ends up being passed to the |
| 2220 // callback. For Read() and Write(), that's what we want. But for Connect(), | 2220 // callback. For Read() and Write(), that's what we want. But for Connect(), |
| 2221 // the caller expects OK (i.e. 0) for success. | 2221 // the caller expects OK (i.e. 0) for success. |
| 2222 void SSLClientSocketNSS::Core::DoConnectCallback(int rv) { | 2222 void SSLClientSocketNSS::Core::DoConnectCallback(int rv) { |
| 2223 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 2223 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 2224 tracked_objects::ScopedProfile tracking_profile( | 2224 tracked_objects::ScopedTracker tracking_profile( |
| 2225 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2225 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2226 "424386 SSLClientSocketNSS::Core::DoConnectCallback")); | 2226 "424386 SSLClientSocketNSS::Core::DoConnectCallback")); |
| 2227 | 2227 |
| 2228 DCHECK(OnNSSTaskRunner()); | 2228 DCHECK(OnNSSTaskRunner()); |
| 2229 DCHECK_NE(rv, ERR_IO_PENDING); | 2229 DCHECK_NE(rv, ERR_IO_PENDING); |
| 2230 DCHECK(!user_connect_callback_.is_null()); | 2230 DCHECK(!user_connect_callback_.is_null()); |
| 2231 | 2231 |
| 2232 base::Closure c = base::Bind( | 2232 base::Closure c = base::Bind( |
| 2233 base::ResetAndReturn(&user_connect_callback_), | 2233 base::ResetAndReturn(&user_connect_callback_), |
| 2234 rv > OK ? OK : rv); | 2234 rv > OK ? OK : rv); |
| 2235 PostOrRunCallback(FROM_HERE, c); | 2235 PostOrRunCallback(FROM_HERE, c); |
| 2236 } | 2236 } |
| 2237 | 2237 |
| 2238 void SSLClientSocketNSS::Core::DoReadCallback(int rv) { | 2238 void SSLClientSocketNSS::Core::DoReadCallback(int rv) { |
| 2239 // TODO(vadimt): Remove ScopedProfile below once crbug.com/424386 is fixed. | 2239 // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed. |
| 2240 tracked_objects::ScopedProfile tracking_profile( | 2240 tracked_objects::ScopedTracker tracking_profile( |
| 2241 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2241 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2242 "424386 SSLClientSocketNSS::Core::DoReadCallback")); | 2242 "424386 SSLClientSocketNSS::Core::DoReadCallback")); |
| 2243 | 2243 |
| 2244 DCHECK(OnNSSTaskRunner()); | 2244 DCHECK(OnNSSTaskRunner()); |
| 2245 DCHECK_NE(ERR_IO_PENDING, rv); | 2245 DCHECK_NE(ERR_IO_PENDING, rv); |
| 2246 DCHECK(!user_read_callback_.is_null()); | 2246 DCHECK(!user_read_callback_.is_null()); |
| 2247 | 2247 |
| 2248 user_read_buf_ = NULL; | 2248 user_read_buf_ = NULL; |
| 2249 user_read_buf_len_ = 0; | 2249 user_read_buf_len_ = 0; |
| 2250 int amount_in_read_buffer = memio_GetReadableBufferSize(nss_bufs_); | 2250 int amount_in_read_buffer = memio_GetReadableBufferSize(nss_bufs_); |
| 2251 // This is used to curry the |amount_int_read_buffer| and |user_cb| back to | 2251 // This is used to curry the |amount_int_read_buffer| and |user_cb| back to |
| 2252 // the network task runner. | 2252 // the network task runner. |
| 2253 PostOrRunCallback( | 2253 PostOrRunCallback( |
| 2254 FROM_HERE, | 2254 FROM_HERE, |
| 2255 base::Bind(&Core::OnNSSBufferUpdated, this, amount_in_read_buffer)); | 2255 base::Bind(&Core::OnNSSBufferUpdated, this, amount_in_read_buffer)); |
| 2256 PostOrRunCallback( | 2256 PostOrRunCallback( |
| 2257 FROM_HERE, | 2257 FROM_HERE, |
| 2258 base::Bind(&Core::DidNSSRead, this, rv)); | 2258 base::Bind(&Core::DidNSSRead, this, rv)); |
| 2259 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed. | 2259 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. |
| 2260 tracked_objects::ScopedProfile tracking_profile1( | 2260 tracked_objects::ScopedTracker tracking_profile1( |
| 2261 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2261 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2262 "SSLClientSocketNSS::Core::DoReadCallback")); | 2262 "SSLClientSocketNSS::Core::DoReadCallback")); |
| 2263 PostOrRunCallback( | 2263 PostOrRunCallback( |
| 2264 FROM_HERE, | 2264 FROM_HERE, |
| 2265 base::Bind(base::ResetAndReturn(&user_read_callback_), rv)); | 2265 base::Bind(base::ResetAndReturn(&user_read_callback_), rv)); |
| 2266 } | 2266 } |
| 2267 | 2267 |
| 2268 void SSLClientSocketNSS::Core::DoWriteCallback(int rv) { | 2268 void SSLClientSocketNSS::Core::DoWriteCallback(int rv) { |
| 2269 DCHECK(OnNSSTaskRunner()); | 2269 DCHECK(OnNSSTaskRunner()); |
| 2270 DCHECK_NE(ERR_IO_PENDING, rv); | 2270 DCHECK_NE(ERR_IO_PENDING, rv); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 DCHECK(nss_waiting_write_); | 2684 DCHECK(nss_waiting_write_); |
| 2685 nss_waiting_write_ = false; | 2685 nss_waiting_write_ = false; |
| 2686 if (result < 0) { | 2686 if (result < 0) { |
| 2687 nss_is_closed_ = true; | 2687 nss_is_closed_ = true; |
| 2688 } else if (result > 0) { | 2688 } else if (result > 0) { |
| 2689 was_ever_used_ = true; | 2689 was_ever_used_ = true; |
| 2690 } | 2690 } |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 void SSLClientSocketNSS::Core::BufferSendComplete(int result) { | 2693 void SSLClientSocketNSS::Core::BufferSendComplete(int result) { |
| 2694 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed. | 2694 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. |
| 2695 tracked_objects::ScopedProfile tracking_profile( | 2695 tracked_objects::ScopedTracker tracking_profile( |
| 2696 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2696 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2697 "418183 DidCompleteReadWrite => Core::BufferSendComplete")); | 2697 "418183 DidCompleteReadWrite => Core::BufferSendComplete")); |
| 2698 | 2698 |
| 2699 if (!OnNSSTaskRunner()) { | 2699 if (!OnNSSTaskRunner()) { |
| 2700 if (detached_) | 2700 if (detached_) |
| 2701 return; | 2701 return; |
| 2702 | 2702 |
| 2703 nss_task_runner_->PostTask( | 2703 nss_task_runner_->PostTask( |
| 2704 FROM_HERE, base::Bind(&Core::BufferSendComplete, this, result)); | 2704 FROM_HERE, base::Bind(&Core::BufferSendComplete, this, result)); |
| 2705 return; | 2705 return; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2732 void SSLClientSocketNSS::Core::OnGetChannelIDComplete(int result) { | 2732 void SSLClientSocketNSS::Core::OnGetChannelIDComplete(int result) { |
| 2733 DVLOG(1) << __FUNCTION__ << " " << result; | 2733 DVLOG(1) << __FUNCTION__ << " " << result; |
| 2734 DCHECK(OnNetworkTaskRunner()); | 2734 DCHECK(OnNetworkTaskRunner()); |
| 2735 | 2735 |
| 2736 OnHandshakeIOComplete(result); | 2736 OnHandshakeIOComplete(result); |
| 2737 } | 2737 } |
| 2738 | 2738 |
| 2739 void SSLClientSocketNSS::Core::BufferRecvComplete( | 2739 void SSLClientSocketNSS::Core::BufferRecvComplete( |
| 2740 IOBuffer* read_buffer, | 2740 IOBuffer* read_buffer, |
| 2741 int result) { | 2741 int result) { |
| 2742 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed. | 2742 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. |
| 2743 tracked_objects::ScopedProfile tracking_profile( | 2743 tracked_objects::ScopedTracker tracking_profile( |
| 2744 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2744 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2745 "418183 DidCompleteReadWrite => SSLClientSocketNSS::Core::...")); | 2745 "418183 DidCompleteReadWrite => SSLClientSocketNSS::Core::...")); |
| 2746 | 2746 |
| 2747 DCHECK(read_buffer); | 2747 DCHECK(read_buffer); |
| 2748 | 2748 |
| 2749 if (!OnNSSTaskRunner()) { | 2749 if (!OnNSSTaskRunner()) { |
| 2750 if (detached_) | 2750 if (detached_) |
| 2751 return; | 2751 return; |
| 2752 | 2752 |
| 2753 nss_task_runner_->PostTask( | 2753 nss_task_runner_->PostTask( |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3622 scoped_refptr<X509Certificate> | 3622 scoped_refptr<X509Certificate> |
| 3623 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { | 3623 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { |
| 3624 return core_->state().server_cert.get(); | 3624 return core_->state().server_cert.get(); |
| 3625 } | 3625 } |
| 3626 | 3626 |
| 3627 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { | 3627 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { |
| 3628 return channel_id_service_; | 3628 return channel_id_service_; |
| 3629 } | 3629 } |
| 3630 | 3630 |
| 3631 } // namespace net | 3631 } // namespace net |
| OLD | NEW |