diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-10-11 12:39:05 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-10-11 12:39:05 +0200 |
| commit | 0fb433690c0ca5f9561fe9e2e973e2cd61b873ba (patch) | |
| tree | 9422a034b09d1e0b46144f35a1f9bcf7860156d6 /client/node.hpp | |
| parent | d8e48c32f8435076382543edfafbf81c223f9e87 (diff) | |
| download | cmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.tar.gz cmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.tar.bz2 cmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.zip | |
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.
Diffstat (limited to 'client/node.hpp')
| -rw-r--r-- | client/node.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/node.hpp b/client/node.hpp index 3719223..afcf56a 100644 --- a/client/node.hpp +++ b/client/node.hpp @@ -22,6 +22,7 @@ inline void message_setter(cmix_proto::CMixMessage& m, cmix_proto::TYPE const& v MESSAGE_SETTER(ImAClient, imaclient) MESSAGE_SETTER(Bye, bye) +MESSAGE_SETTER(KeyExchange, keyexchange) #undef MESSAGE_SETTER @@ -50,6 +51,12 @@ public: } /*! + * \brief receive + * \param receive_handler + */ + void receive(std::function<void(std::vector<uint8_t> const&)> receive_handler); + + /*! * \brief async_connect * \param next_host The host of the next node. * \param next_port The port of the next node. |
