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