mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
47 lines
1.1 KiB
C++
47 lines
1.1 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
|
|
{
|
|
std::shared_ptr< Logic > logic;
|
|
SharedSecret sharedKey;
|
|
ServiceInfo remote;
|
|
const Identity& m_LocalIdentity;
|
|
ProtocolMessage msg;
|
|
ProtocolFrame frame;
|
|
Introduction intro;
|
|
const PQPubKey introPubKey;
|
|
Introduction remoteIntro;
|
|
std::function< void(ProtocolFrame&) > hook;
|
|
IDataHandler* handler;
|
|
ConvoTag tag;
|
|
|
|
AsyncKeyExchange(std::shared_ptr< Logic > l, const ServiceInfo& r,
|
|
const Identity& localident,
|
|
const PQPubKey& introsetPubKey,
|
|
const Introduction& remote, IDataHandler* h,
|
|
const ConvoTag& t, ProtocolType proto);
|
|
|
|
static void
|
|
Result(void* user);
|
|
|
|
/// given protocol message make protocol frame
|
|
static void
|
|
Encrypt(void* user);
|
|
};
|
|
|
|
} // namespace service
|
|
} // namespace llarp
|
|
|
|
#endif
|