fix tls examples in docs

Summary: related to T12804

Reviewers: iljazovic

Reviewed By: iljazovic

Subscribers: miljen

Differential Revision: https://repo.mireo.local/D26736
This commit is contained in:
Korina Šimičević
2023-11-28 13:06:29 +01:00
parent f6248eea40
commit 93dc1064a2

View File

@@ -30,6 +30,12 @@ void tcp_setup() {
// External customization point.
namespace async_mqtt5 {
template <typename StreamBase>
struct tls_handshake_type<asio::ssl::stream<StreamBase>> {
static constexpr auto client = asio::ssl::stream_base::client;
static constexpr auto server = asio::ssl::stream_base::server;
};
// This client uses this funcction to indicate which hostname it is
// attempting to connect to at the start of the handshaking process.
template <typename StreamBase>
@@ -132,6 +138,12 @@ void async_teardown(
namespace async_mqtt5 {
template <typename StreamBase>
struct tls_handshake_type<asio::ssl::stream<StreamBase>> {
static constexpr auto client = asio::ssl::stream_base::client;
static constexpr auto server = asio::ssl::stream_base::server;
};
template <typename streambase>
void assign_tls_sni(
const authority_path& ap,