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