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

Side by Side Diff: net/socket/ssl_server_socket.h

Issue 10543106: Add an explicit function to init NSS for SSL server sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r141775 and remove suppression Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/run_all_unittests.cc ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_export.h" 10 #include "net/base/net_export.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 virtual ~SSLServerSocket() {} 25 virtual ~SSLServerSocket() {}
26 26
27 // Perform the SSL server handshake, and notify the supplied callback 27 // Perform the SSL server handshake, and notify the supplied callback
28 // if the process completes asynchronously. If Disconnect is called before 28 // if the process completes asynchronously. If Disconnect is called before
29 // completion then the callback will be silently, as for other StreamSocket 29 // completion then the callback will be silently, as for other StreamSocket
30 // calls. 30 // calls.
31 virtual int Handshake(const CompletionCallback& callback) = 0; 31 virtual int Handshake(const CompletionCallback& callback) = 0;
32 }; 32 };
33 33
34 // Configures the underlying SSL library for the use of SSL server sockets.
35 //
36 // Due to the requirements of the underlying libraries, this should be called
37 // early in process initialization, before any SSL socket, client or server,
38 // has been used.
39 //
40 // Note: If a process does not use SSL server sockets, this call may be
41 // omitted.
42 NET_EXPORT void EnableSSLServerSockets();
43
34 // Creates an SSL server socket over an already-connected transport socket. 44 // Creates an SSL server socket over an already-connected transport socket.
35 // The caller must provide the server certificate and private key to use. 45 // The caller must provide the server certificate and private key to use.
36 // 46 //
37 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions 47 // The returned SSLServerSocket takes ownership of |socket|. Stubbed versions
38 // of CreateSSLServerSocket will delete |socket| and return NULL. 48 // of CreateSSLServerSocket will delete |socket| and return NULL.
39 // It takes a reference to |certificate|. 49 // It takes a reference to |certificate|.
40 // The |key| and |ssl_config| parameters are copied. |key| cannot be const 50 // The |key| and |ssl_config| parameters are copied. |key| cannot be const
41 // because the methods used to copy its contents are non-const. 51 // because the methods used to copy its contents are non-const.
42 // 52 //
43 // The caller starts the SSL server handshake by calling Handshake on the 53 // The caller starts the SSL server handshake by calling Handshake on the
44 // returned socket. 54 // returned socket.
45 NET_EXPORT SSLServerSocket* CreateSSLServerSocket( 55 NET_EXPORT SSLServerSocket* CreateSSLServerSocket(
46 StreamSocket* socket, 56 StreamSocket* socket,
47 X509Certificate* certificate, 57 X509Certificate* certificate,
48 crypto::RSAPrivateKey* key, 58 crypto::RSAPrivateKey* key,
49 const SSLConfig& ssl_config); 59 const SSLConfig& ssl_config);
50 60
51 } // namespace net 61 } // namespace net
52 62
53 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ 63 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « net/base/run_all_unittests.cc ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698