diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a74101..29f77270 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Version 194: * http::async_read returns the right byte count on error * Add net namespace alias +* Don't use-after-free in test +* Tidy up ssl_stream (experimental) -------------------------------------------------------------------------------- diff --git a/include/boost/beast/_experimental/core/ssl_stream.hpp b/include/boost/beast/_experimental/core/ssl_stream.hpp index 311f3e29..f3d8f4a5 100644 --- a/include/boost/beast/_experimental/core/ssl_stream.hpp +++ b/include/boost/beast/_experimental/core/ssl_stream.hpp @@ -72,7 +72,6 @@ class ssl_stream using stream_type = boost::beast::flat_stream; std::unique_ptr p_; - boost::asio::ssl::context* ctx_; public: /// The native handle type of the SSL stream. @@ -106,25 +105,9 @@ public: boost::asio::ssl::context& ctx) : p_(new stream_type{ std::forward(arg), ctx}) - , ctx_(&ctx) { } - /// Move Constructor - ssl_stream(ssl_stream&& other) - : p_(std::move(other.p_)) - , ctx_(other.ctx_) - { - } - - /// Move Assignment - ssl_stream& operator=(ssl_stream&& other) - { - p_ = std::move(other.p_); - ctx_ = other.ctx_; - return *this; - } - /** Get the executor associated with the object. This function may be used to obtain the executor object that the stream @@ -476,7 +459,7 @@ public: */ template BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler, - void (boost::system::error_code, std::size_t)) + void(boost::system::error_code, std::size_t)) async_handshake(handshake_type type, ConstBufferSequence const& buffers, BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler) { @@ -524,7 +507,7 @@ public: */ template BOOST_ASIO_INITFN_RESULT_TYPE(ShutdownHandler, - void (boost::system::error_code)) + void(boost::system::error_code)) async_shutdown(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler) { return p_->next_layer().async_shutdown( @@ -603,7 +586,7 @@ public: */ template BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, - void (boost::system::error_code, std::size_t)) + void(boost::system::error_code, std::size_t)) async_write_some(ConstBufferSequence const& buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler) {