diff options
Diffstat (limited to 'node/node.hpp')
| -rw-r--r-- | node/node.hpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/node/node.hpp b/node/node.hpp index ac379ca..9d59687 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -24,6 +24,7 @@ struct NodeNetworkSettings { bool is_first; ///< Are we the first node in the network. std::string next_host; ///< Next nodes host. std::string next_port; ///< Next nodes port. + std::string certdir; ///< Directory containing trusted certificate authorities. }; /*! @@ -36,29 +37,31 @@ class Node }; boost::asio::io_service io_service; + std::shared_ptr<boost::asio::ssl::context> ctx; Server server; - typedef std::list<Receiver> Purgatory; + typedef std::list<SSLReceiver> Purgatory; Purgatory purgatory; - typedef std::map<std::string, SenderReceiver> ClientConnections; + typedef std::map<std::string, SSLSenderReceiver> ClientConnections; ClientConnections clients; typedef std::map<std::string, CMixClientData> ClientData; ClientData data; NodeNetworkSettings network_settings; - Receiver prev_node; - Sender next_node; + SSLReceiver prev_node; + SSLSender next_node; Api api; KeyPair keypair; std::vector<uint8_t> network_key; bool shutting_down; - - void accept_handler(boost::asio::ip::tcp::socket&& socket); + void accept_handler(std::unique_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket>>&& socket, std::shared_ptr<boost::asio::ssl::context> ctx); + + void connect_to_next_node(); void start_precomputation(); void start_initialisation(); |
