Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions include/SSLOptions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

#if !defined(_SSLOPTIONS_H)
#define _SSLOPTIONS_H

#include <boost/asio/ssl.hpp>

#include <functional>

class SSLOptions {

public:

/* Set the file containing the certificate chain in PEM format.
*/
void setCertificateChainFile(std::string);

/* Set the file containing the private key in PEM format.
*/
void setPrivateKeyFile(std::string);

private:

std::string certificate_chain_file_ = "";
std::string private_key_file_ = "";

};

#endif // _SSLOPTIONS_H
26 changes: 26 additions & 0 deletions include/TCPServerSSL.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

#if !defined(_TCPSERVERSSL_H)
#define _TCPSERVERSSL_H

#include <TCPServer.hpp>

#include <boost/asio/ssl.hpp>

class SSLOptions;

class TCPServerSSL : public TCPServer {

public:

TCPServerSSL(int threads, uint16_t server_port, NetworkService* callback_service, TransportProtocol tp, SSLOptions ssl_options);

private:

boost::asio::ssl::context ssl_context_;


};



#endif // _TCPSERVERSSL_H