Index: net/socket/ssl_server_socket_openssl.h |
diff --git a/net/socket/ssl_server_socket_openssl.h b/net/socket/ssl_server_socket_openssl.h |
index c789015fe3ba8cba11d12572f89f9193a702bb58..1444400f9bd09bffe3eff00e51938956132e7ad5 100644 |
--- a/net/socket/ssl_server_socket_openssl.h |
+++ b/net/socket/ssl_server_socket_openssl.h |
@@ -13,6 +13,7 @@ |
#include "net/base/io_buffer.h" |
#include "net/log/net_log.h" |
#include "net/socket/ssl_server_socket.h" |
+#include "net/ssl/scoped_openssl_types.h" |
#include "net/ssl/ssl_server_config.h" |
// Avoid including misc OpenSSL headers, i.e.: |
@@ -26,14 +27,32 @@ namespace net { |
class SSLInfo; |
+class SSLServerSocketContextOpenSSL : public SSLServerSocketContext { |
+ public: |
+ SSLServerSocketContextOpenSSL(scoped_refptr<X509Certificate> certificate, |
+ const crypto::RSAPrivateKey& key, |
+ const SSLServerConfig& ssl_server_config); |
+ |
+ scoped_ptr<SSLServerSocket> CreateSSLServerSocket( |
+ scoped_ptr<StreamSocket> socket) override; |
+ |
+ private: |
+ ~SSLServerSocketContextOpenSSL(); |
+ |
+ ScopedSSL_CTX ssl_ctx_; |
+ |
+ // Options for the SSL socket. |
+ SSLServerConfig ssl_server_config_; |
+ |
+ // Certificate for the server. |
+ scoped_refptr<X509Certificate> cert_; |
+ |
+ // Private key used by the server. |
+ scoped_ptr<crypto::RSAPrivateKey> key_; |
+}; |
+ |
class SSLServerSocketOpenSSL : public SSLServerSocket { |
davidben
2016/01/22 23:57:48
Ditto that this needn't be in the header file now.
ryanchung
2016/01/29 23:28:16
Done.
|
public: |
- // See comments on CreateSSLServerSocket for details of how these |
- // parameters are used. |
- SSLServerSocketOpenSSL(scoped_ptr<StreamSocket> socket, |
- scoped_refptr<X509Certificate> certificate, |
- const crypto::RSAPrivateKey& key, |
- const SSLServerConfig& ssl_server_config); |
~SSLServerSocketOpenSSL() override; |
// SSLServerSocket interface. |
@@ -83,6 +102,15 @@ class SSLServerSocketOpenSSL : public SSLServerSocket { |
STATE_HANDSHAKE, |
}; |
+ // See comments on CreateSSLServerSocket for details of how these |
+ // parameters are used. |
+ SSLServerSocketOpenSSL(scoped_ptr<StreamSocket> socket, |
+ scoped_refptr<X509Certificate> certificate, |
+ const crypto::RSAPrivateKey& key, |
+ const SSLServerConfig& ssl_server_config, |
+ SSL* ssl); |
+ friend class SSLServerSocketContextOpenSSL; |
+ |
void OnSendComplete(int result); |
void OnRecvComplete(int result); |
void OnHandshakeIOComplete(int result); |