| 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_NSS_H_ | 5 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ |
| 6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ | 6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <certt.h> | 9 #include <certt.h> |
| 10 #include <keyt.h> | 10 #include <keyt.h> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 // This object takes ownership of the following parameters: | 26 // This object takes ownership of the following parameters: |
| 27 // |socket| - A socket that is already connected. | 27 // |socket| - A socket that is already connected. |
| 28 // |cert| - The certificate to be used by the server. | 28 // |cert| - The certificate to be used by the server. |
| 29 // | 29 // |
| 30 // The following parameters are copied in the constructor. | 30 // The following parameters are copied in the constructor. |
| 31 // |ssl_config| - Options for SSL socket. | 31 // |ssl_config| - Options for SSL socket. |
| 32 // |key| - The private key used by the server. | 32 // |key| - The private key used by the server. |
| 33 SSLServerSocketNSS(Socket* transport_socket, | 33 SSLServerSocketNSS(Socket* transport_socket, |
| 34 scoped_refptr<X509Certificate> cert, | 34 scoped_refptr<X509Certificate> cert, |
| 35 base::RSAPrivateKey* key, | 35 crypto::RSAPrivateKey* key, |
| 36 const SSLConfig& ssl_config); | 36 const SSLConfig& ssl_config); |
| 37 virtual ~SSLServerSocketNSS(); | 37 virtual ~SSLServerSocketNSS(); |
| 38 | 38 |
| 39 // SSLServerSocket implementation. | 39 // SSLServerSocket implementation. |
| 40 virtual int Accept(CompletionCallback* callback); | 40 virtual int Accept(CompletionCallback* callback); |
| 41 virtual int Read(IOBuffer* buf, int buf_len, | 41 virtual int Read(IOBuffer* buf, int buf_len, |
| 42 CompletionCallback* callback); | 42 CompletionCallback* callback); |
| 43 virtual int Write(IOBuffer* buf, int buf_len, | 43 virtual int Write(IOBuffer* buf, int buf_len, |
| 44 CompletionCallback* callback); | 44 CompletionCallback* callback); |
| 45 virtual bool SetReceiveBufferSize(int32 size); | 45 virtual bool SetReceiveBufferSize(int32 size); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Options for the SSL socket. | 115 // Options for the SSL socket. |
| 116 // TODO(hclam): This memeber is currently not used. Should make use of this | 116 // TODO(hclam): This memeber is currently not used. Should make use of this |
| 117 // member to configure the socket. | 117 // member to configure the socket. |
| 118 SSLConfig ssl_config_; | 118 SSLConfig ssl_config_; |
| 119 | 119 |
| 120 // Certificate for the server. | 120 // Certificate for the server. |
| 121 scoped_refptr<X509Certificate> cert_; | 121 scoped_refptr<X509Certificate> cert_; |
| 122 | 122 |
| 123 // Private key used by the server. | 123 // Private key used by the server. |
| 124 scoped_ptr<base::RSAPrivateKey> key_; | 124 scoped_ptr<crypto::RSAPrivateKey> key_; |
| 125 | 125 |
| 126 State next_handshake_state_; | 126 State next_handshake_state_; |
| 127 bool completed_handshake_; | 127 bool completed_handshake_; |
| 128 | 128 |
| 129 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); | 129 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace net | 132 } // namespace net |
| 133 | 133 |
| 134 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ | 134 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ |
| OLD | NEW |