mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#ifndef LLARP_SERVICE_ASYNC_KEY_EXCHANGE_HPP
|
|
#define LLARP_SERVICE_ASYNC_KEY_EXCHANGE_HPP
|
|
|
|
#include <crypto/types.hpp>
|
|
#include <service/identity.hpp>
|
|
#include <service/protocol.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
class Logic;
|
|
|
|
namespace service
|
|
{
|
|
struct AsyncKeyExchange : public std::enable_shared_from_this<AsyncKeyExchange>
|
|
{
|
|
std::shared_ptr<Logic> logic;
|
|
SharedSecret sharedKey;
|
|
ServiceInfo m_remote;
|
|
const Identity& m_LocalIdentity;
|
|
ProtocolMessage msg;
|
|
Introduction intro;
|
|
const PQPubKey introPubKey;
|
|
Introduction remoteIntro;
|
|
std::function<void(std::shared_ptr<ProtocolFrame>)> hook;
|
|
IDataHandler* handler;
|
|
ConvoTag tag;
|
|
|
|
AsyncKeyExchange(
|
|
std::shared_ptr<Logic> l,
|
|
ServiceInfo r,
|
|
const Identity& localident,
|
|
const PQPubKey& introsetPubKey,
|
|
const Introduction& remote,
|
|
IDataHandler* h,
|
|
const ConvoTag& t,
|
|
ProtocolType proto);
|
|
|
|
static void
|
|
Result(std::shared_ptr<AsyncKeyExchange> user, std::shared_ptr<ProtocolFrame> frame);
|
|
|
|
/// given protocol message make protocol frame
|
|
static void
|
|
Encrypt(std::shared_ptr<AsyncKeyExchange> user, std::shared_ptr<ProtocolFrame> frame);
|
|
};
|
|
|
|
} // namespace service
|
|
} // namespace llarp
|
|
|
|
#endif
|