rippled
Loading...
Searching...
No Matches
WorkSSL.h
1#pragma once
2
3#include <xrpld/app/misc/detail/WorkBase.h>
4#include <xrpld/core/Config.h>
5
6#include <xrpl/basics/contract.h>
7#include <xrpl/net/HTTPClientSSLContext.h>
8
9#include <boost/asio/ssl.hpp>
10#include <boost/format.hpp>
11
12#include <functional>
13
14namespace xrpl {
15
16namespace detail {
17
18// Work over SSL
19class WorkSSL : public WorkBase<WorkSSL>, public std::enable_shared_from_this<WorkSSL>
20{
21 friend class WorkBase<WorkSSL>;
22
23private:
24 using stream_type = boost::asio::ssl::stream<socket_type&>;
25
28
29public:
30 WorkSSL(
31 std::string const& host,
32 std::string const& path,
33 std::string const& port,
34 boost::asio::io_context& ios,
36 Config const& config,
37 endpoint_type const& lastEndpoint,
38 bool lastStatus,
39 callback_type cb);
40 ~WorkSSL() = default;
41
42private:
45 {
46 return stream_;
47 }
48
49 void
50 onConnect(error_code const& ec);
51
52 void
53 onHandshake(error_code const& ec);
54};
55
56} // namespace detail
57
58} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
boost::asio::ip::tcp::endpoint endpoint_type
Definition WorkBase.h:24
boost::system::error_code error_code
Definition WorkBase.h:23
HTTPClientSSLContext context_
Definition WorkSSL.h:26
void onConnect(error_code const &ec)
Definition WorkSSL.cpp:31
boost::asio::ssl::stream< socket_type & > stream_type
Definition WorkSSL.h:24
stream_type & stream()
Definition WorkSSL.h:44
void onHandshake(error_code const &ec)
Definition WorkSSL.cpp:44
stream_type stream_
Definition WorkSSL.h:27
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5