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 #include "net/socket/ssl_server_socket_openssl.h" | 5 #include "net/socket/ssl_server_socket_openssl.h" |
6 | 6 |
7 #include <openssl/err.h> | 7 #include <openssl/err.h> |
8 #include <openssl/ssl.h> | 8 #include <openssl/ssl.h> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 NextProto SSLServerSocketOpenSSL::GetNegotiatedProtocol() const { | 241 NextProto SSLServerSocketOpenSSL::GetNegotiatedProtocol() const { |
242 // NPN is not supported by this class. | 242 // NPN is not supported by this class. |
243 return kProtoUnknown; | 243 return kProtoUnknown; |
244 } | 244 } |
245 | 245 |
246 bool SSLServerSocketOpenSSL::GetSSLInfo(SSLInfo* ssl_info) { | 246 bool SSLServerSocketOpenSSL::GetSSLInfo(SSLInfo* ssl_info) { |
247 NOTIMPLEMENTED(); | 247 NOTIMPLEMENTED(); |
248 return false; | 248 return false; |
249 } | 249 } |
250 | 250 |
| 251 void SSLServerSocketOpenSSL::GetConnectionAttempts( |
| 252 ConnectionAttempts* out) const { |
| 253 out->clear(); |
| 254 } |
| 255 |
251 void SSLServerSocketOpenSSL::OnSendComplete(int result) { | 256 void SSLServerSocketOpenSSL::OnSendComplete(int result) { |
252 if (next_handshake_state_ == STATE_HANDSHAKE) { | 257 if (next_handshake_state_ == STATE_HANDSHAKE) { |
253 // In handshake phase. | 258 // In handshake phase. |
254 OnHandshakeIOComplete(result); | 259 OnHandshakeIOComplete(result); |
255 return; | 260 return; |
256 } | 261 } |
257 | 262 |
258 // TODO(byungchul): This state machine is not correct. Copy the state machine | 263 // TODO(byungchul): This state machine is not correct. Copy the state machine |
259 // of SSLClientSocketOpenSSL::OnSendComplete() which handles it better. | 264 // of SSLClientSocketOpenSSL::OnSendComplete() which handles it better. |
260 if (!completed_handshake_) | 265 if (!completed_handshake_) |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 // If this fails (rv = 0) it means there are no ciphers enabled on this SSL. | 730 // If this fails (rv = 0) it means there are no ciphers enabled on this SSL. |
726 // This will almost certainly result in the socket failing to complete the | 731 // This will almost certainly result in the socket failing to complete the |
727 // handshake at which point the appropriate error is bubbled up to the client. | 732 // handshake at which point the appropriate error is bubbled up to the client. |
728 LOG_IF(WARNING, rv != 1) << "SSL_set_cipher_list('" << command | 733 LOG_IF(WARNING, rv != 1) << "SSL_set_cipher_list('" << command |
729 << "') returned " << rv; | 734 << "') returned " << rv; |
730 | 735 |
731 return OK; | 736 return OK; |
732 } | 737 } |
733 | 738 |
734 } // namespace net | 739 } // namespace net |
OLD | NEW |