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 // OpenSSL binding for SSLClientSocket. The class layout and general principle | 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle |
6 // of operation is derived from SSLClientSocketNSS. | 6 // of operation is derived from SSLClientSocketNSS. |
7 | 7 |
8 #include "net/socket/ssl_client_socket_openssl.h" | 8 #include "net/socket/ssl_client_socket_openssl.h" |
9 | 9 |
10 #include <errno.h> | 10 #include <errno.h> |
11 #include <openssl/bio.h> | 11 #include <openssl/bio.h> |
12 #include <openssl/err.h> | 12 #include <openssl/err.h> |
13 #include <openssl/mem.h> | 13 #include <openssl/mem.h> |
14 #include <openssl/ssl.h> | 14 #include <openssl/ssl.h> |
15 #include <string.h> | 15 #include <string.h> |
16 | 16 |
17 #include "base/bind.h" | 17 #include "base/bind.h" |
18 #include "base/callback_helpers.h" | 18 #include "base/callback_helpers.h" |
19 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
20 #include "base/memory/singleton.h" | 20 #include "base/memory/singleton.h" |
21 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
22 #include "base/profiler/scoped_tracker.h" | 22 #include "base/profiler/scoped_tracker.h" |
23 #include "base/stl_util.h" | 23 #include "base/stl_util.h" |
24 #include "base/strings/string_piece.h" | 24 #include "base/strings/string_piece.h" |
25 #include "base/synchronization/lock.h" | 25 #include "base/synchronization/lock.h" |
26 #include "base/threading/sequenced_worker_pool.h" | |
27 #include "base/threading/thread_local.h" | 26 #include "base/threading/thread_local.h" |
28 #include "base/values.h" | 27 #include "base/values.h" |
29 #include "crypto/ec_private_key.h" | 28 #include "crypto/ec_private_key.h" |
30 #include "crypto/openssl_util.h" | 29 #include "crypto/openssl_util.h" |
31 #include "crypto/scoped_openssl_types.h" | 30 #include "crypto/scoped_openssl_types.h" |
32 #include "net/base/ip_address_number.h" | 31 #include "net/base/ip_address_number.h" |
33 #include "net/base/net_errors.h" | 32 #include "net/base/net_errors.h" |
34 #include "net/cert/cert_policy_enforcer.h" | 33 #include "net/cert/cert_policy_enforcer.h" |
35 #include "net/cert/cert_verifier.h" | 34 #include "net/cert/cert_verifier.h" |
36 #include "net/cert/ct_ev_whitelist.h" | 35 #include "net/cert/ct_ev_whitelist.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 *hash = SSLPrivateKey::Hash::SHA384; | 159 *hash = SSLPrivateKey::Hash::SHA384; |
161 return true; | 160 return true; |
162 case NID_sha512: | 161 case NID_sha512: |
163 *hash = SSLPrivateKey::Hash::SHA512; | 162 *hash = SSLPrivateKey::Hash::SHA512; |
164 return true; | 163 return true; |
165 default: | 164 default: |
166 return false; | 165 return false; |
167 } | 166 } |
168 } | 167 } |
169 | 168 |
170 #if !defined(OS_NACL) | |
171 class PlatformKeyTaskRunner { | |
172 public: | |
173 PlatformKeyTaskRunner() { | |
174 // Serialize all the private key operations on a single background | |
175 // thread to avoid problems with buggy smartcards. | |
176 worker_pool_ = new base::SequencedWorkerPool(1, "Platform Key Thread"); | |
177 task_runner_ = worker_pool_->GetSequencedTaskRunnerWithShutdownBehavior( | |
178 worker_pool_->GetSequenceToken(), | |
179 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | |
180 } | |
181 | |
182 scoped_refptr<base::SequencedTaskRunner> task_runner() { | |
183 return task_runner_; | |
184 } | |
185 | |
186 private: | |
187 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | |
188 scoped_refptr<base::SequencedTaskRunner> task_runner_; | |
189 | |
190 DISALLOW_COPY_AND_ASSIGN(PlatformKeyTaskRunner); | |
191 }; | |
192 | |
193 base::LazyInstance<PlatformKeyTaskRunner>::Leaky g_platform_key_task_runner = | |
194 LAZY_INSTANCE_INITIALIZER; | |
195 #endif | |
196 | |
197 } // namespace | 169 } // namespace |
198 | 170 |
199 class SSLClientSocketOpenSSL::SSLContext { | 171 class SSLClientSocketOpenSSL::SSLContext { |
200 public: | 172 public: |
201 static SSLContext* GetInstance() { | 173 static SSLContext* GetInstance() { |
202 return base::Singleton<SSLContext>::get(); | 174 return base::Singleton<SSLContext>::get(); |
203 } | 175 } |
204 SSL_CTX* ssl_ctx() { return ssl_ctx_.get(); } | 176 SSL_CTX* ssl_ctx() { return ssl_ctx_.get(); } |
205 SSLClientSessionCacheOpenSSL* session_cache() { return &session_cache_; } | 177 SSLClientSessionCacheOpenSSL* session_cache() { return &session_cache_; } |
206 | 178 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 577 |
606 npn_status_ = kNextProtoUnsupported; | 578 npn_status_ = kNextProtoUnsupported; |
607 npn_proto_.clear(); | 579 npn_proto_.clear(); |
608 | 580 |
609 channel_id_sent_ = false; | 581 channel_id_sent_ = false; |
610 session_pending_ = false; | 582 session_pending_ = false; |
611 certificate_verified_ = false; | 583 certificate_verified_ = false; |
612 channel_id_request_.Cancel(); | 584 channel_id_request_.Cancel(); |
613 ssl_failure_state_ = SSL_FAILURE_NONE; | 585 ssl_failure_state_ = SSL_FAILURE_NONE; |
614 | 586 |
615 private_key_.reset(); | |
616 signature_result_ = kNoPendingResult; | 587 signature_result_ = kNoPendingResult; |
617 signature_.clear(); | 588 signature_.clear(); |
618 } | 589 } |
619 | 590 |
620 bool SSLClientSocketOpenSSL::IsConnected() const { | 591 bool SSLClientSocketOpenSSL::IsConnected() const { |
621 // If the handshake has not yet completed. | 592 // If the handshake has not yet completed. |
622 if (!completed_connect_) | 593 if (!completed_connect_) |
623 return false; | 594 return false; |
624 // If an asynchronous operation is still pending. | 595 // If an asynchronous operation is still pending. |
625 if (user_read_buf_.get() || user_write_buf_.get()) | 596 if (user_read_buf_.get() || user_write_buf_.get()) |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 // The server supports channel ID. Stop to look one up before returning to | 1008 // The server supports channel ID. Stop to look one up before returning to |
1038 // the handshake. | 1009 // the handshake. |
1039 GotoState(STATE_CHANNEL_ID_LOOKUP); | 1010 GotoState(STATE_CHANNEL_ID_LOOKUP); |
1040 return OK; | 1011 return OK; |
1041 } | 1012 } |
1042 if (ssl_error == SSL_ERROR_WANT_X509_LOOKUP && | 1013 if (ssl_error == SSL_ERROR_WANT_X509_LOOKUP && |
1043 !ssl_config_.send_client_cert) { | 1014 !ssl_config_.send_client_cert) { |
1044 return ERR_SSL_CLIENT_AUTH_CERT_NEEDED; | 1015 return ERR_SSL_CLIENT_AUTH_CERT_NEEDED; |
1045 } | 1016 } |
1046 if (ssl_error == SSL_ERROR_WANT_PRIVATE_KEY_OPERATION) { | 1017 if (ssl_error == SSL_ERROR_WANT_PRIVATE_KEY_OPERATION) { |
1047 DCHECK(private_key_); | 1018 DCHECK(ssl_config_.client_private_key); |
1048 DCHECK_NE(kNoPendingResult, signature_result_); | 1019 DCHECK_NE(kNoPendingResult, signature_result_); |
1049 GotoState(STATE_HANDSHAKE); | 1020 GotoState(STATE_HANDSHAKE); |
1050 return ERR_IO_PENDING; | 1021 return ERR_IO_PENDING; |
1051 } | 1022 } |
1052 | 1023 |
1053 OpenSSLErrorInfo error_info; | 1024 OpenSSLErrorInfo error_info; |
1054 net_error = MapOpenSSLErrorWithDetails(ssl_error, err_tracer, &error_info); | 1025 net_error = MapOpenSSLErrorWithDetails(ssl_error, err_tracer, &error_info); |
1055 if (net_error == ERR_IO_PENDING) { | 1026 if (net_error == ERR_IO_PENDING) { |
1056 // If not done, stay in this state | 1027 // If not done, stay in this state |
1057 GotoState(STATE_HANDSHAKE); | 1028 GotoState(STATE_HANDSHAKE); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 // error, so it does not occur. The second and third are distinguished by | 1474 // error, so it does not occur. The second and third are distinguished by |
1504 // SSL_ERROR_ZERO_RETURN. | 1475 // SSL_ERROR_ZERO_RETURN. |
1505 pending_read_ssl_error_ = SSL_get_error(ssl_, ssl_ret); | 1476 pending_read_ssl_error_ = SSL_get_error(ssl_, ssl_ret); |
1506 if (pending_read_ssl_error_ == SSL_ERROR_ZERO_RETURN) { | 1477 if (pending_read_ssl_error_ == SSL_ERROR_ZERO_RETURN) { |
1507 pending_read_error_ = 0; | 1478 pending_read_error_ = 0; |
1508 } else if (pending_read_ssl_error_ == SSL_ERROR_WANT_X509_LOOKUP && | 1479 } else if (pending_read_ssl_error_ == SSL_ERROR_WANT_X509_LOOKUP && |
1509 !ssl_config_.send_client_cert) { | 1480 !ssl_config_.send_client_cert) { |
1510 pending_read_error_ = ERR_SSL_CLIENT_AUTH_CERT_NEEDED; | 1481 pending_read_error_ = ERR_SSL_CLIENT_AUTH_CERT_NEEDED; |
1511 } else if (pending_read_ssl_error_ == | 1482 } else if (pending_read_ssl_error_ == |
1512 SSL_ERROR_WANT_PRIVATE_KEY_OPERATION) { | 1483 SSL_ERROR_WANT_PRIVATE_KEY_OPERATION) { |
1513 DCHECK(private_key_); | 1484 DCHECK(ssl_config_.client_private_key); |
1514 DCHECK_NE(kNoPendingResult, signature_result_); | 1485 DCHECK_NE(kNoPendingResult, signature_result_); |
1515 pending_read_error_ = ERR_IO_PENDING; | 1486 pending_read_error_ = ERR_IO_PENDING; |
1516 } else { | 1487 } else { |
1517 pending_read_error_ = MapOpenSSLErrorWithDetails( | 1488 pending_read_error_ = MapOpenSSLErrorWithDetails( |
1518 pending_read_ssl_error_, err_tracer, &pending_read_error_info_); | 1489 pending_read_ssl_error_, err_tracer, &pending_read_error_info_); |
1519 } | 1490 } |
1520 | 1491 |
1521 // Many servers do not reliably send a close_notify alert when shutting down | 1492 // Many servers do not reliably send a close_notify alert when shutting down |
1522 // a connection, and instead terminate the TCP connection. This is reported | 1493 // a connection, and instead terminate the TCP connection. This is reported |
1523 // as ERR_CONNECTION_CLOSED. Because of this, map the unclean shutdown to a | 1494 // as ERR_CONNECTION_CLOSED. Because of this, map the unclean shutdown to a |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 return -1; | 1765 return -1; |
1795 } | 1766 } |
1796 | 1767 |
1797 if (!SSL_use_certificate(ssl_, leaf_x509.get()) || | 1768 if (!SSL_use_certificate(ssl_, leaf_x509.get()) || |
1798 !SSL_set1_chain(ssl_, chain.get())) { | 1769 !SSL_set1_chain(ssl_, chain.get())) { |
1799 LOG(WARNING) << "Failed to set client certificate"; | 1770 LOG(WARNING) << "Failed to set client certificate"; |
1800 return -1; | 1771 return -1; |
1801 } | 1772 } |
1802 | 1773 |
1803 #if defined(OS_NACL) | 1774 #if defined(OS_NACL) |
1804 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY); | 1775 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY); |
1805 return -1; | 1776 return -1; |
1806 #else | 1777 #else |
1807 // TODO(davidben): Lift this call up to the embedder so we can actually test | 1778 if (!ssl_config_.client_private_key) { |
1808 // this code. https://crbug.com/394131 | 1779 // The caller supplied a null private key. Fail the handshake and surface |
1809 private_key_ = FetchClientCertPrivateKey( | 1780 // an appropriate error to the caller. |
1810 ssl_config_.client_cert.get(), | |
1811 g_platform_key_task_runner.Get().task_runner()); | |
1812 if (!private_key_) { | |
1813 // Could not find the private key. Fail the handshake and surface an | |
1814 // appropriate error to the caller. | |
1815 LOG(WARNING) << "Client cert found without private key"; | 1781 LOG(WARNING) << "Client cert found without private key"; |
1816 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY); | 1782 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY); |
1817 return -1; | 1783 return -1; |
1818 } | 1784 } |
1819 | 1785 |
1820 SSL_set_private_key_method(ssl_, &SSLContext::kPrivateKeyMethod); | 1786 SSL_set_private_key_method(ssl_, &SSLContext::kPrivateKeyMethod); |
1821 | 1787 |
1822 std::vector<SSLPrivateKey::Hash> digest_prefs = | 1788 std::vector<SSLPrivateKey::Hash> digest_prefs = |
1823 private_key_->GetDigestPreferences(); | 1789 ssl_config_.client_private_key->GetDigestPreferences(); |
1824 | 1790 |
1825 size_t digests_len = digest_prefs.size(); | 1791 size_t digests_len = digest_prefs.size(); |
1826 std::vector<int> digests; | 1792 std::vector<int> digests; |
1827 for (size_t i = 0; i < digests_len; i++) { | 1793 for (size_t i = 0; i < digests_len; i++) { |
1828 switch (digest_prefs[i]) { | 1794 switch (digest_prefs[i]) { |
1829 case SSLPrivateKey::Hash::SHA1: | 1795 case SSLPrivateKey::Hash::SHA1: |
1830 digests.push_back(NID_sha1); | 1796 digests.push_back(NID_sha1); |
1831 break; | 1797 break; |
1832 case SSLPrivateKey::Hash::SHA256: | 1798 case SSLPrivateKey::Hash::SHA256: |
1833 digests.push_back(NID_sha256); | 1799 digests.push_back(NID_sha256); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 | 2036 |
2071 NextProto next_proto = NextProtoFromString(npn_proto_); | 2037 NextProto next_proto = NextProtoFromString(npn_proto_); |
2072 for (NextProto allowed : ssl_config_.renego_allowed_for_protos) { | 2038 for (NextProto allowed : ssl_config_.renego_allowed_for_protos) { |
2073 if (next_proto == allowed) | 2039 if (next_proto == allowed) |
2074 return true; | 2040 return true; |
2075 } | 2041 } |
2076 return false; | 2042 return false; |
2077 } | 2043 } |
2078 | 2044 |
2079 int SSLClientSocketOpenSSL::PrivateKeyTypeCallback() { | 2045 int SSLClientSocketOpenSSL::PrivateKeyTypeCallback() { |
2080 switch (private_key_->GetType()) { | 2046 switch (ssl_config_.client_private_key->GetType()) { |
2081 case SSLPrivateKey::Type::RSA: | 2047 case SSLPrivateKey::Type::RSA: |
2082 return EVP_PKEY_RSA; | 2048 return EVP_PKEY_RSA; |
2083 case SSLPrivateKey::Type::ECDSA: | 2049 case SSLPrivateKey::Type::ECDSA: |
2084 return EVP_PKEY_EC; | 2050 return EVP_PKEY_EC; |
2085 } | 2051 } |
2086 NOTREACHED(); | 2052 NOTREACHED(); |
2087 return EVP_PKEY_NONE; | 2053 return EVP_PKEY_NONE; |
2088 } | 2054 } |
2089 | 2055 |
2090 size_t SSLClientSocketOpenSSL::PrivateKeyMaxSignatureLenCallback() { | 2056 size_t SSLClientSocketOpenSSL::PrivateKeyMaxSignatureLenCallback() { |
2091 return private_key_->GetMaxSignatureLengthInBytes(); | 2057 return ssl_config_.client_private_key->GetMaxSignatureLengthInBytes(); |
2092 } | 2058 } |
2093 | 2059 |
2094 ssl_private_key_result_t SSLClientSocketOpenSSL::PrivateKeySignCallback( | 2060 ssl_private_key_result_t SSLClientSocketOpenSSL::PrivateKeySignCallback( |
2095 uint8_t* out, | 2061 uint8_t* out, |
2096 size_t* out_len, | 2062 size_t* out_len, |
2097 size_t max_out, | 2063 size_t max_out, |
2098 const EVP_MD* md, | 2064 const EVP_MD* md, |
2099 const uint8_t* in, | 2065 const uint8_t* in, |
2100 size_t in_len) { | 2066 size_t in_len) { |
2101 DCHECK_EQ(kNoPendingResult, signature_result_); | 2067 DCHECK_EQ(kNoPendingResult, signature_result_); |
2102 DCHECK(signature_.empty()); | 2068 DCHECK(signature_.empty()); |
2103 DCHECK(private_key_); | 2069 DCHECK(ssl_config_.client_private_key); |
2104 | 2070 |
2105 net_log_.BeginEvent(NetLog::TYPE_SSL_PRIVATE_KEY_OPERATION); | 2071 net_log_.BeginEvent(NetLog::TYPE_SSL_PRIVATE_KEY_OPERATION); |
2106 | 2072 |
2107 SSLPrivateKey::Hash hash; | 2073 SSLPrivateKey::Hash hash; |
2108 if (!EVP_MDToPrivateKeyHash(md, &hash)) { | 2074 if (!EVP_MDToPrivateKeyHash(md, &hash)) { |
2109 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED); | 2075 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED); |
2110 return ssl_private_key_failure; | 2076 return ssl_private_key_failure; |
2111 } | 2077 } |
2112 | 2078 |
2113 signature_result_ = ERR_IO_PENDING; | 2079 signature_result_ = ERR_IO_PENDING; |
2114 private_key_->SignDigest( | 2080 ssl_config_.client_private_key->SignDigest( |
2115 hash, base::StringPiece(reinterpret_cast<const char*>(in), in_len), | 2081 hash, base::StringPiece(reinterpret_cast<const char*>(in), in_len), |
2116 base::Bind(&SSLClientSocketOpenSSL::OnPrivateKeySignComplete, | 2082 base::Bind(&SSLClientSocketOpenSSL::OnPrivateKeySignComplete, |
2117 weak_factory_.GetWeakPtr())); | 2083 weak_factory_.GetWeakPtr())); |
2118 return ssl_private_key_retry; | 2084 return ssl_private_key_retry; |
2119 } | 2085 } |
2120 | 2086 |
2121 ssl_private_key_result_t SSLClientSocketOpenSSL::PrivateKeySignCompleteCallback( | 2087 ssl_private_key_result_t SSLClientSocketOpenSSL::PrivateKeySignCompleteCallback( |
2122 uint8_t* out, | 2088 uint8_t* out, |
2123 size_t* out_len, | 2089 size_t* out_len, |
2124 size_t max_out) { | 2090 size_t max_out) { |
2125 DCHECK_NE(kNoPendingResult, signature_result_); | 2091 DCHECK_NE(kNoPendingResult, signature_result_); |
2126 DCHECK(private_key_); | 2092 DCHECK(ssl_config_.client_private_key); |
2127 | 2093 |
2128 if (signature_result_ == ERR_IO_PENDING) | 2094 if (signature_result_ == ERR_IO_PENDING) |
2129 return ssl_private_key_retry; | 2095 return ssl_private_key_retry; |
2130 if (signature_result_ != OK) { | 2096 if (signature_result_ != OK) { |
2131 OpenSSLPutNetError(FROM_HERE, signature_result_); | 2097 OpenSSLPutNetError(FROM_HERE, signature_result_); |
2132 return ssl_private_key_failure; | 2098 return ssl_private_key_failure; |
2133 } | 2099 } |
2134 if (signature_.size() > max_out) { | 2100 if (signature_.size() > max_out) { |
2135 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED); | 2101 OpenSSLPutNetError(FROM_HERE, ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED); |
2136 return ssl_private_key_failure; | 2102 return ssl_private_key_failure; |
2137 } | 2103 } |
2138 memcpy(out, vector_as_array(&signature_), signature_.size()); | 2104 memcpy(out, vector_as_array(&signature_), signature_.size()); |
2139 *out_len = signature_.size(); | 2105 *out_len = signature_.size(); |
2140 signature_.clear(); | 2106 signature_.clear(); |
2141 return ssl_private_key_success; | 2107 return ssl_private_key_success; |
2142 } | 2108 } |
2143 | 2109 |
2144 void SSLClientSocketOpenSSL::OnPrivateKeySignComplete( | 2110 void SSLClientSocketOpenSSL::OnPrivateKeySignComplete( |
2145 Error error, | 2111 Error error, |
2146 const std::vector<uint8_t>& signature) { | 2112 const std::vector<uint8_t>& signature) { |
2147 DCHECK_EQ(ERR_IO_PENDING, signature_result_); | 2113 DCHECK_EQ(ERR_IO_PENDING, signature_result_); |
2148 DCHECK(signature_.empty()); | 2114 DCHECK(signature_.empty()); |
2149 DCHECK(private_key_); | 2115 DCHECK(ssl_config_.client_private_key); |
2150 | 2116 |
2151 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_PRIVATE_KEY_OPERATION, | 2117 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_PRIVATE_KEY_OPERATION, |
2152 error); | 2118 error); |
2153 | 2119 |
2154 signature_result_ = error; | 2120 signature_result_ = error; |
2155 if (signature_result_ == OK) | 2121 if (signature_result_ == OK) |
2156 signature_ = signature; | 2122 signature_ = signature; |
2157 | 2123 |
2158 if (next_handshake_state_ == STATE_HANDSHAKE) { | 2124 if (next_handshake_state_ == STATE_HANDSHAKE) { |
2159 OnHandshakeIOComplete(signature_result_); | 2125 OnHandshakeIOComplete(signature_result_); |
2160 return; | 2126 return; |
2161 } | 2127 } |
2162 | 2128 |
2163 // During a renegotiation, either Read or Write calls may be blocked on an | 2129 // During a renegotiation, either Read or Write calls may be blocked on an |
2164 // asynchronous private key operation. | 2130 // asynchronous private key operation. |
2165 PumpReadWriteEvents(); | 2131 PumpReadWriteEvents(); |
2166 } | 2132 } |
2167 | 2133 |
2168 } // namespace net | 2134 } // namespace net |
OLD | NEW |