Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: net/socket/ssl_server_socket.h

Issue 7054010: Update SSLServerSocket to provide the net::StreamSocket interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix function signature for OpenSSL build. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_server_socket_nss.h » ('j') | net/socket/ssl_server_socket_nss.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_server_socket.h
diff --git a/net/socket/ssl_server_socket.h b/net/socket/ssl_server_socket.h
index 61877d2f5f9bff775d3f405387a5bd1948e4fa53..52647257c084aa9869d83ef054d0b1f43b853b86 100644
--- a/net/socket/ssl_server_socket.h
+++ b/net/socket/ssl_server_socket.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "net/base/completion_callback.h"
#include "net/base/net_api.h"
-#include "net/socket/socket.h"
+#include "net/socket/stream_socket.h"
namespace crypto {
class RSAPrivateKey;
@@ -20,33 +20,20 @@ class IOBuffer;
struct SSLConfig;
class X509Certificate;
-// SSLServerSocket takes an already connected socket and performs SSL on top of
-// it.
-//
-// This class is designed to work in a peer-to-peer connection and is not
-// intended to be used as a standalone SSL server.
-class SSLServerSocket : public Socket {
- public:
- virtual ~SSLServerSocket() {}
-
- // Performs an SSL server handshake on the existing socket. The given socket
- // must have already been connected.
- //
- // Accept either returns ERR_IO_PENDING, in which case the given callback
- // will be called in the future with the real result, or it completes
- // synchronously, returning the result immediately.
- virtual int Accept(CompletionCallback* callback) = 0;
-};
wtc 2011/06/02 19:48:24 It is strange that a header file named ssl_server_
-
// Creates an SSL server socket using an already connected socket. A certificate
// and private key needs to be provided.
//
-// This created server socket will take ownership of |socket|. However |key|
-// is copied.
-// TODO(hclam): Defines ServerSocketFactory to create SSLServerSocket. This will
-// make mocking easier.
-NET_API SSLServerSocket* CreateSSLServerSocket(
- Socket* socket, X509Certificate* certificate, crypto::RSAPrivateKey* key,
+// The SSL StreamSocket takes ownership of |socket|.
wtc 2011/06/02 19:48:24 You should document that this happens even if the
Wez 2011/06/02 22:06:01 Done.
+// It takes a reference to |certificate|.
+// The |key| and |ssl_config| parameters are copied. |key| cannot be const
+// because the methods used to copy its contents are non-const.
+//
+// The caller starts the SSL connection acceptance protocol by calling Connect
wtc 2011/06/02 19:48:24 Nit: SSL connection acceptance protocol => SSL ser
Wez 2011/06/02 22:06:01 Done.
+// on the returned socket.
+NET_API StreamSocket* CreateSSLServerSocket(
+ StreamSocket* socket,
+ X509Certificate* certificate,
+ crypto::RSAPrivateKey* key,
const SSLConfig& ssl_config);
} // namespace net
« no previous file with comments | « no previous file | net/socket/ssl_server_socket_nss.h » ('j') | net/socket/ssl_server_socket_nss.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698