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

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

Issue 679473002: Allow two SSL Server Socket parameters to be tuned by the caller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | 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) 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 14 matching lines...) Expand all
25 public: 25 public:
26 ~SSLServerSocket() override {} 26 ~SSLServerSocket() override {}
27 27
28 // Perform the SSL server handshake, and notify the supplied callback 28 // Perform the SSL server handshake, and notify the supplied callback
29 // if the process completes asynchronously. If Disconnect is called before 29 // if the process completes asynchronously. If Disconnect is called before
30 // completion then the callback will be silently, as for other StreamSocket 30 // completion then the callback will be silently, as for other StreamSocket
31 // calls. 31 // calls.
32 virtual int Handshake(const CompletionCallback& callback) = 0; 32 virtual int Handshake(const CompletionCallback& callback) = 0;
33 }; 33 };
34 34
35 // Sets parameters used by SSL Server Sockets. In order for these parameters
36 // to take effect, this must be called before the first call to
37 // EnableSSLServerSockets. Otherwise, the default parameters below will be used.
38 //
39 // max_session_id_cache_entries: default: 1024
40 // ssl_session_id_cache_timeout (seconds): default: 5
41 NET_EXPORT void SetSSLServerSessionCacheParameters(
42 int max_session_id_cache_entries,
43 int ssl_session_id_cache_timeout);
44
35 // Configures the underlying SSL library for the use of SSL server sockets. 45 // Configures the underlying SSL library for the use of SSL server sockets.
36 // 46 //
37 // Due to the requirements of the underlying libraries, this should be called 47 // Due to the requirements of the underlying libraries, this should be called
38 // early in process initialization, before any SSL socket, client or server, 48 // early in process initialization, before any SSL socket, client or server,
39 // has been used. 49 // has been used.
40 // 50 //
41 // Note: If a process does not use SSL server sockets, this call may be 51 // Note: If a process does not use SSL server sockets, this call may be
42 // omitted. 52 // omitted.
43 NET_EXPORT void EnableSSLServerSockets(); 53 NET_EXPORT void EnableSSLServerSockets();
44 54
(...skipping 10 matching lines...) Expand all
55 // returned socket. 65 // returned socket.
56 NET_EXPORT scoped_ptr<SSLServerSocket> CreateSSLServerSocket( 66 NET_EXPORT scoped_ptr<SSLServerSocket> CreateSSLServerSocket(
57 scoped_ptr<StreamSocket> socket, 67 scoped_ptr<StreamSocket> socket,
58 X509Certificate* certificate, 68 X509Certificate* certificate,
59 crypto::RSAPrivateKey* key, 69 crypto::RSAPrivateKey* key,
60 const SSLConfig& ssl_config); 70 const SSLConfig& ssl_config);
61 71
62 } // namespace net 72 } // namespace net
63 73
64 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_ 74 #endif // NET_SOCKET_SSL_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698