20 #ifndef RIPPLE_OVERLAY_HANDSHAKE_H_INCLUDED
21 #define RIPPLE_OVERLAY_HANDSHAKE_H_INCLUDED
23 #include <ripple/app/main/Application.h>
24 #include <ripple/beast/utility/Journal.h>
25 #include <ripple/protocol/BuildInfo.h>
26 #include <boost/asio/ip/tcp.hpp>
27 #include <boost/asio/ssl/context.hpp>
28 #include <boost/asio/ssl/stream.hpp>
29 #include <boost/beast/core/tcp_stream.hpp>
30 #include <boost/beast/ssl/ssl_stream.hpp>
32 #include <boost/asio/ssl.hpp>
33 #include <boost/beast/http/fields.hpp>
34 #include <boost/optional.hpp>
51 boost::optional<uint256>
58 boost::beast::http::fields& h,
60 boost::optional<std::uint32_t> networkID,
78 boost::beast::http::fields
const& headers,
80 boost::optional<std::uint32_t> networkID,
void buildHandshake(boost::beast::http::fields &h, ripple::uint256 const &sharedValue, boost::optional< std::uint32_t > networkID, beast::IP::Address public_ip, beast::IP::Address remote_ip, Application &app)
Insert fields headers necessary for upgrading the link to the peer protocol.
PublicKey verifyHandshake(boost::beast::http::fields const &headers, ripple::uint256 const &sharedValue, boost::optional< std::uint32_t > networkID, beast::IP::Address public_ip, beast::IP::Address remote, Application &app)
Validate header fields necessary for upgrading the link to the peer protocol.
Integers of any length that is a multiple of 32-bits.
boost::asio::ip::address Address
boost::optional< uint256 > makeSharedValue(stream_type &ssl, beast::Journal journal)
Computes a shared value based on the SSL connection state.
A generic endpoint for log messages.
boost::beast::ssl_stream< socket_type > stream_type
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::beast::tcp_stream socket_type