Bidirectional secure handshake

This commit is contained in:
Ian Gulliver
2015-02-07 10:58:20 -08:00
parent ce0d4481d3
commit 403c193576
2 changed files with 64 additions and 4 deletions

View File

@@ -49,9 +49,10 @@ class CryptoPubServerConnection : public CryptoBase {
struct bufferevent* bev_;
const std::string secret_key_;
const std::string ephemeral_secret_key_;
std::string ephemeral_secret_key_;
std::string client_public_key_;
std::string client_ephemeral_public_key_;
enum {
AWAITING_HANDSHAKE,
READY,
@@ -82,4 +83,10 @@ class CryptoPubClient : public CryptoBase {
const std::string server_public_key_;
std::string public_key_;
std::string ephemeral_secret_key_;
std::string server_ephemeral_public_key_;
enum {
AWAITING_HANDSHAKE,
READY,
} state_;
};