| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 #include "net/base/net_api.h" | 10 #include "net/base/net_export.h" |
| 11 #include "net/socket/stream_socket.h" | 11 #include "net/socket/stream_socket.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class StringPiece; | 14 class StringPiece; |
| 15 } // namespace base | 15 } // namespace base |
| 16 | 16 |
| 17 namespace crypto { | 17 namespace crypto { |
| 18 class RSAPrivateKey; | 18 class RSAPrivateKey; |
| 19 } // namespace crypto | 19 } // namespace crypto |
| 20 | 20 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 // The caller must provide the server certificate and private key to use. | 47 // The caller must provide the server certificate and private key to use. |
| 48 // | 48 // |
| 49 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions | 49 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions |
| 50 // of CreateSSLServerSocket will delete |socket| and return NULL. | 50 // of CreateSSLServerSocket will delete |socket| and return NULL. |
| 51 // It takes a reference to |certificate|. | 51 // It takes a reference to |certificate|. |
| 52 // The |key| and |ssl_config| parameters are copied. |key| cannot be const | 52 // The |key| and |ssl_config| parameters are copied. |key| cannot be const |
| 53 // because the methods used to copy its contents are non-const. | 53 // because the methods used to copy its contents are non-const. |
| 54 // | 54 // |
| 55 // The caller starts the SSL server handshake by calling Handshake on the | 55 // The caller starts the SSL server handshake by calling Handshake on the |
| 56 // returned socket. | 56 // returned socket. |
| 57 NET_API SSLServerSocket* CreateSSLServerSocket( | 57 NET_EXPORT SSLServerSocket* CreateSSLServerSocket( |
| 58 StreamSocket* socket, | 58 StreamSocket* socket, |
| 59 X509Certificate* certificate, | 59 X509Certificate* certificate, |
| 60 crypto::RSAPrivateKey* key, | 60 crypto::RSAPrivateKey* key, |
| 61 const SSLConfig& ssl_config); | 61 const SSLConfig& ssl_config); |
| 62 | 62 |
| 63 } // namespace net | 63 } // namespace net |
| 64 | 64 |
| 65 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ | 65 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ |
| OLD | NEW |