From 0fb433690c0ca5f9561fe9e2e973e2cd61b873ba Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Tue, 11 Oct 2016 12:39:05 +0200 Subject: Commit introducing Client keyexchange, triggering bugs. Clients now send their public key to each node and the node calculates the shared secret. The node does not yet respond with it's public key. To keep this commit smaller. Nodes now disconnect from each other in a better way. Getting the relevant crypto api is now done with a generic function. What crypto algorithm and implemenation is beign used can be selected in the cmake cache (use cmake-gui or ccmake) Clients now connect correctly to multiple nodes. --- libcmix-network/client.cpp | 2 +- libcmix-network/connect.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'libcmix-network') diff --git a/libcmix-network/client.cpp b/libcmix-network/client.cpp index 9293bd1..f693afa 100644 --- a/libcmix-network/client.cpp +++ b/libcmix-network/client.cpp @@ -81,7 +81,7 @@ void Client::handle_receive_message(MessageHandler message_handler, const error_ } } -void Client::handle_receive_size(Client::MessageHandler message_handler, const error_code& ec, size_t read_bytes) +void Client::handle_receive_size(Client::MessageHandler message_handler, error_code const& ec, size_t read_bytes) { using namespace boost::asio::placeholders; diff --git a/libcmix-network/connect.cpp b/libcmix-network/connect.cpp index fb663ac..01e72de 100644 --- a/libcmix-network/connect.cpp +++ b/libcmix-network/connect.cpp @@ -96,6 +96,8 @@ void async_connect(tcp::socket& socket, std::string host, std::string next_port, boost::asio::ip::basic_resolver resolver(socket.get_io_service()); boost::asio::ip::basic_resolver_query query(host, next_port); + BOOST_LOG_TRIVIAL(trace) << "connecting to: \"" << host << ":" << next_port << "\""; + auto it = resolver.resolve(query); std::shared_ptr info = std::make_shared(0, it, socket.get_io_service()); -- cgit v1.2.3-70-g09d2