| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ | |
| 6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ | |
| 7 | |
| 8 #include <certt.h> | |
| 9 #include <keyt.h> | |
| 10 #include <nspr.h> | |
| 11 #include <nss.h> | |
| 12 #include <stdint.h> | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "base/macros.h" | |
| 17 #include "net/base/completion_callback.h" | |
| 18 #include "net/base/host_port_pair.h" | |
| 19 #include "net/base/nss_memio.h" | |
| 20 #include "net/log/net_log.h" | |
| 21 #include "net/socket/ssl_server_socket.h" | |
| 22 #include "net/ssl/ssl_server_config.h" | |
| 23 | |
| 24 namespace net { | |
| 25 | |
| 26 class SSLServerContextNSS : public SSLServerContext { | |
| 27 public: | |
| 28 SSLServerContextNSS(X509Certificate* certificate, | |
| 29 const crypto::RSAPrivateKey& key, | |
| 30 const SSLServerConfig& ssl_server_config); | |
| 31 ~SSLServerContextNSS() override; | |
| 32 | |
| 33 std::unique_ptr<SSLServerSocket> CreateSSLServerSocket( | |
| 34 std::unique_ptr<StreamSocket> socket) override; | |
| 35 | |
| 36 private: | |
| 37 // Options for the SSL socket. | |
| 38 SSLServerConfig ssl_server_config_; | |
| 39 | |
| 40 // Certificate for the server. | |
| 41 scoped_refptr<X509Certificate> cert_; | |
| 42 | |
| 43 // Private key used by the server. | |
| 44 std::unique_ptr<crypto::RSAPrivateKey> key_; | |
| 45 }; | |
| 46 | |
| 47 } // namespace net | |
| 48 | |
| 49 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ | |
| OLD | NEW |