Implement SSL support for servers and clients

Summary:
This diff implements OpenSSL support in the network stack.
Currently SSL support is only enabled for Bolt connections,
support for RPC connections will be added in another diff.

Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1328
This commit is contained in:
Matej Ferencevic
2018-06-20 17:44:47 +02:00
parent 44821a918c
commit 1d448d40ca
55 changed files with 1400 additions and 177 deletions

View File

@@ -32,8 +32,8 @@ class TestSession {
output_stream_.Write(input_stream_.data(), input_stream_.size());
}
communication::InputStream input_stream_;
communication::OutputStream output_stream_;
communication::InputStream &input_stream_;
communication::OutputStream &output_stream_;
};
std::atomic<bool> run{true};
@@ -63,8 +63,9 @@ TEST(Network, SocketReadHangOnConcurrentConnections) {
TestData data;
int N = (std::thread::hardware_concurrency() + 1) / 2;
int Nc = N * 3;
communication::Server<TestSession, TestData> server(endpoint, data, -1,
"Test", N);
communication::ServerContext context;
communication::Server<TestSession, TestData> server(endpoint, data, &context,
-1, "Test", N);
const auto &ep = server.endpoint();
// start clients