From 7cd6f06f1678f51ba21a670bc1a5c76356b223c5 Mon Sep 17 00:00:00 2001 From: Hannes Rantzsch Date: Tue, 23 Apr 2019 10:26:37 +0200 Subject: use class instead of struct --- src/lib/tls/asio/asio_async_base.h | 3 ++- src/lib/tls/asio/asio_async_handshake_op.h | 3 ++- src/lib/tls/asio/asio_async_read_op.h | 3 ++- src/lib/tls/asio/asio_async_write_op.h | 3 ++- src/lib/tls/asio/asio_stream_core.h | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/lib/tls/asio') diff --git a/src/lib/tls/asio/asio_async_base.h b/src/lib/tls/asio/asio_async_base.h index 9e559f249..6585ded55 100644 --- a/src/lib/tls/asio/asio_async_base.h +++ b/src/lib/tls/asio/asio_async_base.h @@ -59,8 +59,9 @@ namespace TLS { * \tparam Allocator Type of the allocator to be used */ template -struct AsyncBase : boost::asio::coroutine +class AsyncBase : public boost::asio::coroutine { + public: using allocator_type = boost::asio::associated_allocator_t; using executor_type = boost::asio::associated_executor_t; diff --git a/src/lib/tls/asio/asio_async_handshake_op.h b/src/lib/tls/asio/asio_async_handshake_op.h index 92a9de7da..6bb895ff2 100644 --- a/src/lib/tls/asio/asio_async_handshake_op.h +++ b/src/lib/tls/asio/asio_async_handshake_op.h @@ -26,8 +26,9 @@ namespace Botan { namespace TLS { template > -struct AsyncHandshakeOperation : public AsyncBase +class AsyncHandshakeOperation : public AsyncBase { + public: /** * Construct and invoke an AsyncHandshakeOperation. * diff --git a/src/lib/tls/asio/asio_async_read_op.h b/src/lib/tls/asio/asio_async_read_op.h index 5457a73ac..52c63cea5 100644 --- a/src/lib/tls/asio/asio_async_read_op.h +++ b/src/lib/tls/asio/asio_async_read_op.h @@ -26,8 +26,9 @@ namespace Botan { namespace TLS { template > -struct AsyncReadOperation : public AsyncBase +class AsyncReadOperation : public AsyncBase { + public: /** * Construct and invoke an AsyncWriteOperation. * diff --git a/src/lib/tls/asio/asio_async_write_op.h b/src/lib/tls/asio/asio_async_write_op.h index df34958e0..db347e5c5 100644 --- a/src/lib/tls/asio/asio_async_write_op.h +++ b/src/lib/tls/asio/asio_async_write_op.h @@ -25,8 +25,9 @@ namespace Botan { namespace TLS { template > -struct AsyncWriteOperation : public AsyncBase +class AsyncWriteOperation : public AsyncBase { + public: /** * Construct and invoke an AsyncWriteOperation. * diff --git a/src/lib/tls/asio/asio_stream_core.h b/src/lib/tls/asio/asio_stream_core.h index 00369ad86..dbf95c37a 100644 --- a/src/lib/tls/asio/asio_stream_core.h +++ b/src/lib/tls/asio/asio_stream_core.h @@ -28,8 +28,9 @@ namespace TLS { /** * Contains the buffers for reading/sending, and the needed botan callbacks */ -struct StreamCore : public Botan::TLS::Callbacks +class StreamCore : public Botan::TLS::Callbacks { + public: StreamCore() : m_input_buffer_space(MAX_CIPHERTEXT_SIZE, '\0'), input_buffer(m_input_buffer_space.data(), m_input_buffer_space.size()) {} -- cgit v1.2.3