11 #ifndef ASIO_SSL_STREAM_HPP 12 #define ASIO_SSL_STREAM_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_ENABLE_OLD_SSL) 22 #else // defined(ASIO_ENABLE_OLD_SSL) 37 #endif // defined(ASIO_ENABLE_OLD_SSL) 44 #if defined(ASIO_ENABLE_OLD_SSL) 48 #else // defined(ASIO_ENABLE_OLD_SSL) 72 template <
typename Stream>
105 template <
typename Arg>
110 backwards_compatible_impl_.ssl = core_.engine_.native_handle();
128 return next_layer_.lowest_layer().get_io_service();
157 return core_.engine_.native_handle();
169 return &backwards_compatible_impl_;
208 return next_layer_.lowest_layer();
221 return next_layer_.lowest_layer();
258 return core_.engine_.set_verify_mode(v, ec);
295 return core_.engine_.set_verify_depth(depth, ec);
316 template <
typename VerifyCallback>
342 template <
typename VerifyCallback>
346 return core_.engine_.set_verify_callback(
396 template <
typename ConstBufferSequence>
416 template <
typename ConstBufferSequence>
440 template <
typename HandshakeHandler>
481 template <
typename ConstBufferSequence,
typename BufferedHandshakeHandler>
490 BufferedHandshakeHandler, handler) type_check;
542 template <
typename ShutdownHandler>
576 template <
typename ConstBufferSequence>
601 template <
typename ConstBufferSequence>
631 template <
typename ConstBufferSequence,
typename WriteHandler>
634 async_write_some(
const ConstBufferSequence&
buffers,
667 template <
typename MutableBufferSequence>
668 std::size_t
read_some(
const MutableBufferSequence& buffers)
692 template <
typename MutableBufferSequence>
693 std::size_t
read_some(
const MutableBufferSequence& buffers,
723 template <
typename MutableBufferSequence,
typename ReadHandler>
726 async_read_some(
const MutableBufferSequence& buffers,
746 impl_struct backwards_compatible_impl_;
749 #endif // defined(ASIO_ENABLE_OLD_SSL) 756 #endif // ASIO_SSL_STREAM_HPP asio::error_code handshake(handshake_type type, asio::error_code &ec)
Perform SSL handshaking.
Structure for use with deprecated impl_type.
void throw_error(const asio::error_code &err)
ASIO_MOVE_ARG(WriteHandler) handler)
void async_io(Stream &next_layer, stream_core &core, const Operation &op, Handler &handler)
void set_verify_mode(verify_mode v)
Set the peer verification mode.
ASIO_INITFN_RESULT_TYPE(ShutdownHandler, void(asio::error_code)) async_shutdown(ASIO_MOVE_ARG(ShutdownHandler) handler)
Asynchronously shut down SSL on the stream.
Provides core I/O functionality.
void set_verify_callback(VerifyCallback callback)
Set the callback used to verify peer certificates.
asio::error_code set_verify_callback(VerifyCallback callback, asio::error_code &ec)
Set the callback used to verify peer certificates.
asio::basic_streambuf< Allocator > MatchCondition enable_if< is_match_condition< MatchCondition >::value >::type *detail::async_result_init< ReadHandler, void(asio::error_code, std::size_t)> init(ASIO_MOVE_CAST(ReadHandler)(handler))
Provides stream-oriented functionality using SSL.
native_handle_type native_handle()
Get the underlying implementation in the native type.
void shutdown()
Shut down SSL on the stream.
const ConstBufferSequence & buffers
#define ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK(handler_type, handler)
std::size_t io(Stream &next_layer, stream_core &core, const Operation &op, asio::error_code &ec)
void set_verify_depth(int depth)
Set the peer verification depth.
void handshake(handshake_type type, const ConstBufferSequence &buffers)
Perform SSL handshaking.
next_layer_type & next_layer()
Get a reference to the next layer.
handshake_type
Different handshake types.
#define ASIO_READ_HANDLER_CHECK(handler_type, handler)
asio::error_code set_verify_mode(verify_mode v, asio::error_code &ec)
Set the peer verification mode.
int verify_mode
Bitmask type for peer verification.
std::size_t read_some(const MutableBufferSequence &buffers)
Read some data from the stream.
ASIO_MOVE_ARG(HandshakeHandler) handler)
const lowest_layer_type & lowest_layer() const
Get a reference to the lowest layer.
const next_layer_type & next_layer() const
Get a reference to the next layer.
#define ASIO_SHUTDOWN_HANDLER_CHECK(handler_type, handler)
ASIO_INITFN_RESULT_TYPE(HandshakeHandler, void(asio::error_code)) async_handshake(handshake_type type
Start an asynchronous SSL handshake.
ASIO_MOVE_ARG(ReadHandler) handler)
#define ASIO_HANDSHAKE_HANDLER_CHECK(handler_type, handler)
impl_struct * impl_type
(Deprecated: Use native_handle_type.) The underlying implementation type.
next_layer_type::lowest_layer_type lowest_layer_type
The type of the lowest layer.
stream(Arg &arg, context &ctx)
Construct a stream.
Class to represent an error code value.
asio::error_code handshake(handshake_type type, const ConstBufferSequence &buffers, asio::error_code &ec)
Perform SSL handshaking.
SSL * native_handle_type
The native handle type of the SSL stream.
lowest_layer_type & lowest_layer()
Get a reference to the lowest layer.
void handshake(handshake_type type)
Perform SSL handshaking.
handler_type< Handler, Signature >::type handler
Provides stream-oriented functionality using SSL.
#define ASIO_MOVE_CAST(type)
asio::error_code shutdown(asio::error_code &ec)
Shut down SSL on the stream.
async_result< typename handler_type< Handler, Signature >::type > result
std::size_t read_some(const MutableBufferSequence &buffers, asio::error_code &ec)
Read some data from the stream.
#define ASIO_WRITE_HANDLER_CHECK(handler_type, handler)
remove_reference< Stream >::type next_layer_type
The type of the next layer.
std::size_t write_some(const ConstBufferSequence &buffers, asio::error_code &ec)
Write some data to the stream.
std::size_t write_some(const ConstBufferSequence &buffers)
Write some data to the stream.
asio::io_service & get_io_service()
Get the io_service associated with the object.
asio::error_code set_verify_depth(int depth, asio::error_code &ec)
Set the peer verification depth.