Chromium Code Reviews| 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 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_H_ | 5 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_H_ |
| 6 #define NET_SOCKET_SSL_SERVER_SOCKET_H_ | 6 #define NET_SOCKET_SSL_SERVER_SOCKET_H_ |
| 7 | 7 |
| 8 #include <vector> | |
|
davidben
2015/12/14 23:56:49
Not used?
ryanchung
2015/12/16 22:40:01
Done.
| |
| 9 | |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/completion_callback.h" | 12 #include "net/base/completion_callback.h" |
| 11 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 12 #include "net/socket/ssl_socket.h" | 14 #include "net/socket/ssl_socket.h" |
| 13 #include "net/socket/stream_socket.h" | 15 #include "net/socket/stream_socket.h" |
| 14 | 16 |
| 15 namespace crypto { | 17 namespace crypto { |
| 16 class RSAPrivateKey; | 18 class RSAPrivateKey; |
| 17 } // namespace crypto | 19 } // namespace crypto |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 41 // Note: If a process does not use SSL server sockets, this call may be | 43 // Note: If a process does not use SSL server sockets, this call may be |
| 42 // omitted. | 44 // omitted. |
| 43 NET_EXPORT void EnableSSLServerSockets(); | 45 NET_EXPORT void EnableSSLServerSockets(); |
| 44 | 46 |
| 45 // Creates an SSL server socket over an already-connected transport socket. | 47 // Creates an SSL server socket over an already-connected transport socket. |
| 46 // The caller must provide the server certificate and private key to use. | 48 // The caller must provide the server certificate and private key to use. |
| 47 // | 49 // |
| 48 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions | 50 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions |
| 49 // of CreateSSLServerSocket will delete |socket| and return NULL. | 51 // of CreateSSLServerSocket will delete |socket| and return NULL. |
| 50 // It takes a reference to |certificate|. | 52 // It takes a reference to |certificate|. |
| 51 // The |key| and |ssl_config| parameters are copied. |key| cannot be const | 53 // The |key| and |ssl_server_config| parameters are copied. |key| cannot be |
| 52 // because the methods used to copy its contents are non-const. | 54 // const because the methods used to copy its contents are non-const. |
| 53 // | 55 // |
| 54 // The caller starts the SSL server handshake by calling Handshake on the | 56 // The caller starts the SSL server handshake by calling Handshake on the |
| 55 // returned socket. | 57 // returned socket. |
| 56 NET_EXPORT scoped_ptr<SSLServerSocket> CreateSSLServerSocket( | 58 NET_EXPORT scoped_ptr<SSLServerSocket> CreateSSLServerSocket( |
| 57 scoped_ptr<StreamSocket> socket, | 59 scoped_ptr<StreamSocket> socket, |
| 58 X509Certificate* certificate, | 60 X509Certificate* certificate, |
| 59 crypto::RSAPrivateKey* key, | 61 crypto::RSAPrivateKey* key, |
| 60 const SSLServerConfig& ssl_config); | 62 const SSLServerConfig& ssl_server_config); |
| 61 | 63 |
| 62 } // namespace net | 64 } // namespace net |
| 63 | 65 |
| 64 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ | 66 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ |
| OLD | NEW |