mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
46ad8d4058
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use - shuffled around some cmake linking to simplify dependency graph - superfluous files removed
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "identity.hpp"
|
|
#include "protocol.hpp"
|
|
|
|
#include <llarp/crypto/types.hpp>
|
|
|
|
namespace llarp::service
|
|
{
|
|
struct AsyncKeyExchange : public std::enable_shared_from_this<AsyncKeyExchange>
|
|
{
|
|
EventLoop_ptr loop;
|
|
SharedSecret sharedKey;
|
|
ServiceInfo m_remote;
|
|
const Identity& m_LocalIdentity;
|
|
ProtocolMessage msg;
|
|
Introduction intro;
|
|
const PQPubKey introPubKey;
|
|
Introduction remoteIntro;
|
|
std::function<void(std::shared_ptr<ProtocolFrameMessage>)> hook;
|
|
Endpoint* handler;
|
|
ConvoTag tag;
|
|
|
|
AsyncKeyExchange(
|
|
EventLoop_ptr l,
|
|
ServiceInfo r,
|
|
const Identity& localident,
|
|
const PQPubKey& introsetPubKey,
|
|
const Introduction& remote,
|
|
Endpoint* h,
|
|
const ConvoTag& t);
|
|
|
|
static void
|
|
Result(std::shared_ptr<AsyncKeyExchange> user, std::shared_ptr<ProtocolFrameMessage> frame);
|
|
|
|
/// given protocol message make protocol frame
|
|
static void
|
|
Encrypt(std::shared_ptr<AsyncKeyExchange> user, std::shared_ptr<ProtocolFrameMessage> frame);
|
|
};
|
|
|
|
} // namespace llarp::service
|