diff --git a/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_acceptor.h b/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_acceptor.h new file mode 100644 index 0000000..0331689 --- /dev/null +++ b/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_acceptor.h @@ -0,0 +1,61 @@ +/* Diagnostic Client library + * Copyright (C) 2024 Avijit Dey + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_ACCEPTOR_H_ +#define DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_ACCEPTOR_H_ + +#include "boost-support/server/tls/tls_server.h" + +namespace boost_support { +namespace server { +namespace tls { + +/** + * @brief The acceptor to create new tcp servers + */ +class TlsAcceptor final { + public: + /** + * @brief Constructs an instance of Acceptor + * @details Tcp connection shall be accepted on this ip address and port + * @param[in] local_ip_address + * The local ip address + * @param[in] local_port_num + * The local port number + * @param[in] maximum_connection + * The maximum number of accepted connection allowed + */ + TlsAcceptor(std::string_view local_ip_address, std::uint16_t local_port_num, + std::uint8_t maximum_connection) noexcept; + + /** + * @brief Destruct an instance of TcpAcceptor + */ + ~TlsAcceptor() noexcept; + + /** + * @brief Get a tls server ready to communicate + * @details This blocks until new server is created + * @return Tls server object on success, else nothing + */ + std::optional GetTlsServer() noexcept; + + private: + /** + * @brief Forward declaration of tls acceptor implementation + */ + class TlsAcceptorImpl; + + /** + * @brief Unique pointer to tls acceptor implementation + */ + std::unique_ptr tls_acceptor_impl_; +}; +} // namespace tls +} // namespace server +} // namespace boost_support +#endif // DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_ACCEPTOR_H_ diff --git a/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_server.h b/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_server.h new file mode 100644 index 0000000..45f5883 --- /dev/null +++ b/diag-client-lib/lib/boost-support/include/boost-support/server/tls/tls_server.h @@ -0,0 +1,123 @@ +/* Diagnostic Client library + * Copyright (C) 2024 Avijit Dey + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_SERVER_H_ +#define DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_SERVER_H_ + +#include +#include + +#include "boost-support/message/tcp/tcp_message.h" +#include "core/include/result.h" + +namespace boost_support { +namespace socket { +namespace tls { +class TlsSocket; +} // namespace tls +} // namespace socket + +namespace server { +namespace tls { + +/** + * @brief Server that manages unsecured/ secured tcp connection + */ +class TlsServer final { + public: + /** + * @brief Type alias for tcp unsecured socket + */ + using TlsSocket = socket::tls::TlsSocket; + + /** + * @brief Type alias for Tcp message + */ + using Message = boost_support::message::tcp::TcpMessage; + + /** + * @brief Type alias for Tcp message pointer + */ + using MessagePtr = boost_support::message::tcp::TcpMessagePtr; + + /** + * @brief Type alias for Tcp message const pointer + */ + using MessageConstPtr = boost_support::message::tcp::TcpMessageConstPtr; + + /** + * @brief Tcp function template used for reception + */ + using HandlerRead = std::function; + + public: + /** + * @brief Constructs an instance of TlsServer + * @param[in] tls_socket + * The underlying tls socket required for communication + */ + explicit TlsServer(TlsSocket tls_socket) noexcept; + + /** + * @brief Deleted copy assignment and copy constructor + */ + TlsServer(const TlsServer &other) noexcept = delete; + TlsServer &operator=(const TlsServer &other) noexcept = delete; + + /** + * @brief Move assignment and move constructor + */ + TlsServer(TlsServer &&other) noexcept; + TlsServer &operator=(TlsServer &&other) noexcept; + + /** + * @brief Destruct an instance of TcpServer + */ + ~TlsServer() noexcept; + + /** + * @brief Initialize the server + */ + void Initialize() noexcept; + + /** + * @brief De-initialize the server + */ + void DeInitialize() noexcept; + + /** + * @brief Function to set the read handler that is invoked when message is received + * @details The ownership of provided read handler is moved + * @param[in] read_handler + * The handler to be set + */ + void SetReadHandler(HandlerRead read_handler) noexcept; + + /** + * @brief Function to transmit the provided tcp message + * @param[in] tcp_message + * The tcp message + * @return Empty void on success, otherwise error is returned + */ + core_type::Result Transmit(MessageConstPtr tcp_message); + + private: + /** + * @brief Forward declaration of tcp server implementation + */ + class TlsServerImpl; + + /** + * @brief Unique pointer to tcp server implementation + */ + std::unique_ptr tls_server_impl_; +}; + +} // namespace tls +} // namespace server +} // namespace boost_support +#endif // DIAG_CLIENT_LIB_LIB_BOOST_SUPPORT_INCLUDE_BOOST_SUPPORT_SERVER_TLS_TLS_SERVER_H_ diff --git a/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_acceptor.cpp b/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_acceptor.cpp new file mode 100644 index 0000000..654895c --- /dev/null +++ b/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_acceptor.cpp @@ -0,0 +1,113 @@ +/* Diagnostic Client library + * Copyright (C) 2024 Avijit Dey + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +// includes +#include + +#include "boost-support/common/logger.h" +#include "boost-support/server/tcp/tcp_acceptor.h" +#include "boost-support/socket/tcp/tcp_socket.h" + +namespace boost_support { +namespace server { +namespace tcp { +namespace { +/** + * @brief Type alias for tcp protocol + */ +using Tcp = boost::asio::ip::tcp; + +/** + * @brief Type alias for tcp ip address + */ +using TcpIpAddress = boost::asio::ip::address; + +} // namespace + +class TcpAcceptor::TcpAcceptorImpl final { + public: + /** + * @brief Type alias for tcp unsecured socket + */ + using TcpSocket = socket::tcp::TcpSocket; + + public: + /** + * @brief Constructs an instance of Acceptor + * @details Tcp connection shall be accepted on this ip address and port + * @param[in] local_ip_address + * The local ip address + * @param[in] local_port_num + * The local port number + * @param[in] maximum_connection + * The maximum number of accepted connection + */ + TcpAcceptorImpl(std::string_view local_ip_address, std::uint16_t local_port_num, + std::uint8_t maximum_connection) noexcept + : io_context_{}, + acceptor_{io_context_, + Tcp::endpoint(TcpIpAddress::from_string(std::string{local_ip_address}.c_str()), local_port_num)} { + acceptor_.listen(maximum_connection); + } + + /** + * @brief Get a tcp server ready to communicate + * @details This blocks until new server is created + * @return Tcp server object on success, else nothing + */ + std::optional GetTcpServer() noexcept { + using TcpErrorCodeType = boost::system::error_code; + std::optional tcp_server{}; + TcpErrorCodeType ec{}; + Tcp::endpoint endpoint{}; + + // blocking accept + TcpSocket::Socket accepted_socket{acceptor_.accept(endpoint, ec)}; + if (ec.value() == boost::system::errc::success) { + tcp_server.emplace(TcpSocket{std::move(accepted_socket)}); + common::logger::LibBoostLogger::GetLibBoostLogger().GetLogger().LogDebug( + __FILE__, __LINE__, __func__, [&endpoint](std::stringstream &msg) { + msg << "Tcp socket connection received from client " + << "<" << endpoint.address().to_string() << "," << endpoint.port() << ">"; + }); + } else { + common::logger::LibBoostLogger::GetLibBoostLogger().GetLogger().LogError( + __FILE__, __LINE__, __func__, + [ec](std::stringstream &msg) { msg << "Tcp socket accept failed with error: " << ec.message(); }); + } + return tcp_server; + } + + private: + /** + * @brief Type alias for tcp acceptor + */ + using Acceptor = boost::asio::ip::tcp::acceptor; + + /** + * @brief Store the io context + */ + boost::asio::io_context io_context_; + + /** + * @brief Store the tcp acceptor + */ + Acceptor acceptor_; +}; + +TcpAcceptor::TcpAcceptor(std::string_view local_ip_address, std::uint16_t local_port_num, + std::uint8_t maximum_connection) noexcept + : tcp_acceptor_impl_{std::make_unique(local_ip_address, local_port_num, maximum_connection)} {} + +TcpAcceptor::~TcpAcceptor() noexcept = default; + +std::optional TcpAcceptor::GetTcpServer() noexcept { return tcp_acceptor_impl_->GetTcpServer(); } + +} // namespace tcp +} // namespace server +} // namespace boost_support diff --git a/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_server.cpp b/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_server.cpp new file mode 100644 index 0000000..bb13054 --- /dev/null +++ b/diag-client-lib/lib/boost-support/src/boost-support/server/tls/tls_server.cpp @@ -0,0 +1,106 @@ +/* Diagnostic Client library + * Copyright (C) 2024 Avijit Dey + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "boost-support/server/tls/tls_server.h" + +#include "boost-support/connection/tcp/tcp_connection.h" +#include "boost-support/socket/tls/tls_socket.h" + +namespace boost_support { +namespace server { +namespace tls { + +class TlsServer::TlsServerImpl final { + public: + /** + * @brief Type alias for tcp server connection + */ + using TcpConnection = connection::tcp::TcpConnection; + + /** + * @brief Constructs an instance of TcpServerImpl + * @param[in] tcp_socket + * The underlying tcp socket required for communication + */ + explicit TlsServerImpl(TlsSocket tcp_socket) noexcept : tcp_connection_{std::move(tcp_socket)} {} + + /** + * @brief Deleted copy assignment and copy constructor + */ + TlsServerImpl(const TlsServerImpl &other) noexcept = delete; + TlsServerImpl &operator=(const TlsServerImpl &other) noexcept = delete; + + /** + * @brief Deleted move assignment and move constructor + */ + TlsServerImpl(TlsServerImpl &&other) noexcept = delete; + TlsServerImpl &operator=(TlsServerImpl &&other) noexcept = delete; + + /** + * @brief Destruct an instance of TcpServerImpl + */ + ~TlsServerImpl() noexcept = default; + + /** + * @brief Initialize the TcpServerImpl + */ + void Initialize() noexcept { tcp_connection_.Initialize(); } + + /** + * @brief De-initialize the TcpServerImpl + */ + void DeInitialize() noexcept { tcp_connection_.DeInitialize(); } + + /** + * @brief Function to set the read handler that is invoked when message is received + * @details The ownership of provided read handler is moved + * @param[in] read_handler + * The handler to be set + */ + void SetReadHandler(HandlerRead read_handler) noexcept { tcp_connection_.SetReadHandler(std::move(read_handler)); } + + /** + * @brief Function to transmit the provided tcp message + * @param[in] tcp_message + * The tcp message + * @return Empty void on success, otherwise error is returned + */ + core_type::Result Transmit(MessageConstPtr tcp_message) { + return tcp_connection_.Transmit(std::move(tcp_message)); + } + + private: + /** + * @brief Store the tcp connection + */ + TcpConnection tcp_connection_; +}; + +TlsServer::TlsServer(TlsServer::TlsSocket tls_socket) noexcept + : tls_server_impl_{std::make_unique(std::move(tls_socket))} {} + +TlsServer::TlsServer(TlsServer &&other) noexcept = default; + +TlsServer &TlsServer::operator=(TlsServer &&other) noexcept = default; + +TlsServer::~TlsServer() noexcept = default; + +void TlsServer::Initialize() noexcept { tls_server_impl_->Initialize(); } + +void TlsServer::DeInitialize() noexcept { tls_server_impl_->DeInitialize(); } + +void TlsServer::SetReadHandler(TlsServer::HandlerRead read_handler) noexcept { + tls_server_impl_->SetReadHandler(std::move(read_handler)); +} + +core_type::Result TlsServer::Transmit(TlsServer::MessageConstPtr tcp_message) { + return tls_server_impl_->Transmit(std::move(tcp_message)); +} +} // namespace tls +} // namespace server +} // namespace boost_support diff --git a/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tcp_socket.h b/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tcp_socket.h index 05ce447..cb2d1ae 100644 --- a/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tcp_socket.h +++ b/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tcp_socket.h @@ -67,10 +67,6 @@ class TcpSocket final { /** * @brief Constructs an instance of TcpSocket - * @param[in] local_ip_address - * The local ip address - * @param[in] local_port_num - * The local port number * @param[in] socket * The socket */ diff --git a/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server.cpp b/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server_.cpp similarity index 99% rename from diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server.cpp rename to diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server_.cpp index 9ba10df..7b502bc 100644 --- a/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server.cpp +++ b/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server_.cpp @@ -5,7 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "boost-support/socket/tcp/tls_server.h" +#include "boost-support/socket/tcp/tls_server_.h" #include diff --git a/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server.h b/diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server_.h similarity index 100% rename from diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server.h rename to diag-client-lib/lib/boost-support/src/boost-support/socket/tcp/tls_server_.h diff --git a/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.cpp b/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.cpp index 0f7cb4f..6e76f79 100644 --- a/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.cpp +++ b/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.cpp @@ -18,14 +18,15 @@ namespace tls { TlsSocket::TlsSocket(std::string_view local_ip_address, std::uint16_t local_port_num, TlsContext &tls_context, IoContext &io_context) noexcept - : local_ip_address_{local_ip_address}, - local_port_num_{local_port_num}, - tls_socket_{io_context.GetContext(), tls_context.GetContext()} {} + : ssl_stream_{io_context.GetContext(), tls_context.GetContext()}, + local_endpoint_{boost::asio::ip::make_address(local_ip_address), local_port_num} {} + +TlsSocket::TlsSocket(TlsSocket::TcpSocket tcp_socket, TlsContext &tls_context) noexcept + : ssl_stream_{std::move(tcp_socket), tls_context.GetContext()} {} TlsSocket::TlsSocket(TlsSocket &&other) noexcept - : local_ip_address_{std::move(other.local_ip_address_)}, - local_port_num_{other.local_port_num_}, - tls_socket_{std::move(other.tls_socket_)} {} + : ssl_stream_{std::move(other.ssl_stream_)}, + local_endpoint_{std::move(other.local_endpoint_)} {} TlsSocket::~TlsSocket() noexcept = default; @@ -34,14 +35,14 @@ core_type::Result TlsSocket::Open() noexcept { TcpErrorCodeType ec{}; // Open the socket - GetNativeTcpSocket().open(Tcp::v4(), ec); + GetNativeTcpSocket().open(local_endpoint_.protocol(), ec); if (ec.value() == boost::system::errc::success) { // Reuse address GetNativeTcpSocket().set_option(boost::asio::socket_base::reuse_address{true}); // Set socket to non blocking GetNativeTcpSocket().non_blocking(false); // Bind to local ip address and random port - GetNativeTcpSocket().bind(Tcp::endpoint(TcpIpAddress::from_string(local_ip_address_), local_port_num_), ec); + GetNativeTcpSocket().bind(local_endpoint_, ec); if (ec.value() == boost::system::errc::success) { // Socket binding success @@ -56,13 +57,13 @@ core_type::Result TlsSocket::Open() noexcept { // Socket binding failed common::logger::LibBoostLogger::GetLibBoostLogger().GetLogger().LogError( __FILE__, __LINE__, __func__, - [ec](std::stringstream &msg) { msg << "Tcp Socket binding failed with message: " << ec.message(); }); + [ec](std::stringstream &msg) { msg << "Tls Socket binding failed with message: " << ec.message(); }); result.EmplaceError(SocketError::kBindingFailed); } } else { common::logger::LibBoostLogger::GetLibBoostLogger().GetLogger().LogError( __FILE__, __LINE__, __func__, - [ec](std::stringstream &msg) { msg << "Tcp Socket opening failed with error: " << ec.message(); }); + [ec](std::stringstream &msg) { msg << "Tls Socket opening failed with error: " << ec.message(); }); result.EmplaceError(SocketError::kOpenFailed); } return result; @@ -84,9 +85,9 @@ core_type::Result TlsSocket::Connect(std::string_v << "<" << endpoint_.address().to_string() << "," << endpoint_.port() << ">"; }); // Perform TLS handshake - tls_socket_.handshake(boost::asio::ssl::stream_base::client, ec); + ssl_stream_.handshake(boost::asio::ssl::stream_base::client, ec); if (ec.value() == boost::system::errc::success) { - printf("Connected with %s encryption\n", SSL_get_cipher(tls_socket_.native_handle())); + printf("Connected with %s encryption\n", SSL_get_cipher(ssl_stream_.native_handle())); result.EmplaceValue(); } else { common::logger::LibBoostLogger::GetLibBoostLogger().GetLogger().LogError( @@ -107,7 +108,7 @@ core_type::Result TlsSocket::Disconnect() noexcept core_type::Result result{SocketError::kGenericError}; TcpErrorCodeType ec{}; // Shutdown TLS connection - tls_socket_.shutdown(ec); + ssl_stream_.shutdown(ec); // Shutdown of TCP connection GetNativeTcpSocket().shutdown(Tcp::socket ::shutdown_both, ec); @@ -127,7 +128,7 @@ core_type::Result TlsSocket::Transmit(TcpMessageCo core_type::Result result{SocketError::kGenericError}; TcpErrorCodeType ec{}; - boost::asio::write(tls_socket_, + boost::asio::write(ssl_stream_, boost::asio::buffer(tcp_message->GetPayload().data(), tcp_message->GetPayload().size()), ec); // Check for error if (ec.value() == boost::system::errc::success) { @@ -161,7 +162,7 @@ core_type::Result TlsSocket::R TcpMessage::BufferType rx_buffer{}; rx_buffer.resize(message::tcp::kDoipheadrSize); // start blocking read to read Header first - boost::asio::read(tls_socket_, boost::asio::buffer(&rx_buffer[0u], message::tcp::kDoipheadrSize), ec); + boost::asio::read(ssl_stream_, boost::asio::buffer(&rx_buffer[0u], message::tcp::kDoipheadrSize), ec); // Check for error if (ec.value() == boost::system::errc::success) { // read the next bytes to read @@ -175,7 +176,7 @@ core_type::Result TlsSocket::R if (read_next_bytes != 0u) { // reserve the buffer rx_buffer.resize(message::tcp::kDoipheadrSize + std::size_t(read_next_bytes)); - boost::asio::read(tls_socket_, boost::asio::buffer(&rx_buffer[message::tcp::kDoipheadrSize], read_next_bytes), + boost::asio::read(ssl_stream_, boost::asio::buffer(&rx_buffer[message::tcp::kDoipheadrSize], read_next_bytes), ec); // all message received, transfer to upper layer @@ -206,7 +207,7 @@ core_type::Result TlsSocket::R return result; } -TlsSocket::Socket::lowest_layer_type &TlsSocket::GetNativeTcpSocket() { return tls_socket_.lowest_layer(); } +TlsSocket::SslStream::lowest_layer_type &TlsSocket::GetNativeTcpSocket() { return ssl_stream_.lowest_layer(); } } // namespace tls } // namespace socket diff --git a/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.h b/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.h index f0bb082..a52ccfd 100644 --- a/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.h +++ b/diag-client-lib/lib/boost-support/src/boost-support/socket/tls/tls_socket.h @@ -50,6 +50,16 @@ class TlsSocket final { */ using TcpMessageConstPtr = boost_support::message::tcp::TcpMessageConstPtr; + /** + * @brief Type alias for tcp protocol + */ + using Tcp = boost::asio::ip::tcp; + + /** + * @brief Type alias for tcp socket + */ + using TcpSocket = Tcp::socket; + public: /** * @brief Constructs an instance of TcpSocket @@ -63,6 +73,13 @@ class TlsSocket final { TlsSocket(std::string_view local_ip_address, std::uint16_t local_port_num, TlsContext &tls_context, IoContext &io_context) noexcept; + /** + * @brief Constructs an instance of TcpSocket + * @param[in] socket + * The socket + */ + TlsSocket(TcpSocket tcp_socket, TlsContext &tls_context) noexcept; + /** * @brief Deleted copy assignment and copy constructor */ @@ -137,36 +154,26 @@ class TlsSocket final { */ using TcpErrorCodeType = boost::system::error_code; - /** - * @brief Type alias for tcp protocol - */ - using Tcp = boost::asio::ip::tcp; - /** * @brief Type alias for tcp socket */ - using Socket = boost::asio::ssl::stream; + using SslStream = boost::asio::ssl::stream; /** - * @brief Store local ip address - */ - std::string local_ip_address_; - - /** - * @brief Store local port number + * @brief Store the underlying tcp socket */ - std::uint16_t local_port_num_; + SslStream ssl_stream_; /** - * @brief Store the underlying tcp socket + * @brief Store the local endpoints */ - Socket tls_socket_; + Tcp::endpoint local_endpoint_; private: /** * @brief Function to get the native tcp socket under tls socket */ - Socket ::lowest_layer_type &GetNativeTcpSocket(); + SslStream::lowest_layer_type &GetNativeTcpSocket(); }; } // namespace tls } // namespace socket diff --git a/test/test_case/tls_test.cpp b/test/test_case/tls_test.cpp index c58b8cc..da8aec5 100644 --- a/test/test_case/tls_test.cpp +++ b/test/test_case/tls_test.cpp @@ -11,7 +11,7 @@ #include #include "boost-support/socket/tcp/tls_client_.h" -#include "boost-support/socket/tcp/tls_server.h" +#include "boost-support/socket/tcp/tls_server_.h" namespace doip_client { namespace {