Move crypto code to a subdirectory

pull/222/head
Michael 5 years ago
parent 328ce40212
commit 04e0fe3ad7
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

@ -493,8 +493,8 @@ set(LIB_SRC
llarp/codel.cpp
llarp/config.cpp
llarp/context.cpp
llarp/crypto.cpp
llarp/crypto_libsodium.cpp
llarp/crypto/crypto.cpp
llarp/crypto/crypto_libsodium.cpp
llarp/dht.cpp
llarp/dht/bucket.cpp
llarp/dht/context.cpp
@ -614,6 +614,7 @@ set(DNS_SRC
)
set(TEST_SRC
test/crypto/test_llarp_crypto.cpp
test/dht/test_llarp_dht_key.cpp
test/dht/test_llarp_dht.cpp
test/dns/test_llarp_dns_dns.cpp
@ -626,12 +627,11 @@ set(TEST_SRC
test/routing/test_llarp_routing_obtainexitmessage.cpp
test/service/test_llarp_service_address.cpp
test/service/test_llarp_service_identity.cpp
test/test_llarp_crypto.cpp
test/test_llarp_dns.cpp
test/test_llarp_dnsd.cpp
test/test_llarp_encrypted_frame.cpp
test/test_llarp_router.cpp
test/test_llarp_router_contact.cpp
test/test_llarp_router.cpp
test/util/test_llarp_util_aligned.cpp
test/util/test_llarp_util_bencode.cpp
test/util/test_llarp_util_encode.cpp

@ -1,5 +1,5 @@
#include <buffer.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <fs.hpp>
#include <llarp.h>
#include <logger.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_HPP
#define LLARP_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <util/threading.hpp>
#include <iostream>

@ -1,6 +1,6 @@
#include <abyss/client.hpp>
#include <abyss/http.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <util/buffer.hpp>
#include <util/logger.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_AI_HPP
#define LLARP_AI_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <net/net.h>
#include <util/bencode.hpp>
#include <util/mem.h>

@ -1,4 +1,4 @@
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <util/buffer.hpp>

@ -1,4 +1,5 @@
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <sodium/crypto_generichash.h>
#include <sodium/crypto_sign.h>
#include <sodium/crypto_scalarmult.h>

@ -1,7 +1,7 @@
#ifndef LLARP_DHT_H_
#define LLARP_DHT_H_
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <router_contact.hpp>
#include <util/buffer.h>

@ -1,7 +1,7 @@
#ifndef LLARP_DHT_BUCKET_HPP
#define LLARP_DHT_BUCKET_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <dht/kademlia.hpp>
#include <dht/key.hpp>
#include <map>

@ -1,6 +1,6 @@
#include <encrypted_frame.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_ENCRYPTED_FRAME_HPP
#define LLARP_ENCRYPTED_FRAME_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted.hpp>
#include <util/buffer.hpp>
#include <util/mem.h>

@ -1,7 +1,7 @@
#ifndef LLARP_EXIT_ENDPOINT_HPP
#define LLARP_EXIT_ENDPOINT_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <ip.hpp>
#include <path/path.hpp>
#include <util/time.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_XI_HPP
#define LLARP_XI_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <net/net.hpp>
#include <util/bencode.hpp>
#include <util/bits.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_LINK_SERVER_HPP
#define LLARP_LINK_SERVER_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <ev/ev.h>
#include <link/session.hpp>
#include <net/net.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_LINK_SESSION_HPP
#define LLARP_LINK_SESSION_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <net/net.hpp>
#include <router_contact.hpp>
#include <util/types.hpp>

@ -1,6 +1,7 @@
#ifndef LLARP_MESSAGES_EXIT_HPP
#define LLARP_MESSAGES_EXIT_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <exit/policy.hpp>
#include <routing/message.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_MESSAGES_PATH_TRANSFER_HPP
#define LLARP_MESSAGES_PATH_TRANSFER_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted.hpp>
#include <routing/message.hpp>
#include <service/protocol.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_MESSAGES_RELAY_HPP
#define LLARP_MESSAGES_RELAY_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted.hpp>
#include <link_message.hpp>
#include <path/path_types.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_RELAY_COMMIT_HPP
#define LLARP_RELAY_COMMIT_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted_ack.hpp>
#include <encrypted_frame.hpp>
#include <link_message.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP
#define LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted.hpp>
#include <routing/message.hpp>

@ -1,6 +1,6 @@
#include <nodedb.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <router_contact.hpp>
#include <util/buffer.hpp>
#include <util/encode.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_NODEDB_HPP
#define LLARP_NODEDB_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <router_contact.hpp>
#include <router_id.hpp>
#include <util/common.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_PATH_HPP
#define LLARP_PATH_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <messages/relay_commit.hpp>
#include <messages/relay.hpp>
#include <path/path_types.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_PATH_TYPES_HPP
#define LLARP_PATH_TYPES_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <util/aligned.hpp>
namespace llarp

@ -1,6 +1,6 @@
#ifndef LLARP_POW_HPP
#define LLARP_POW_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <router_id.hpp>
#include <util/bencode.hpp>

@ -1,7 +1,7 @@
#include <router.hpp>
#include <constants/proto.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <dht/context.hpp>
#include <link_message.hpp>
#include <link/iwp.hpp>

@ -2,7 +2,7 @@
#define LLARP_ROUTER_HPP
#include <config.h>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <dht.h>
#include <establish_job.hpp>
#include <ev/ev.h>

@ -1,7 +1,7 @@
#include <router_contact.hpp>
#include <constants/version.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <net/net.hpp>
#include <util/bencode.hpp>
#include <util/buffer.hpp>

@ -3,8 +3,9 @@
#include <address_info.hpp>
#include <constants/version.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <exit_info.hpp>
#include <util/aligned.hpp>
#include <util/bencode.hpp>
#include <vector>

@ -1,7 +1,7 @@
#ifndef LLARP_RPC_HPP
#define LLARP_RPC_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <ev/ev.h>
#include <util/time.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_IDENTITY_HPP
#define LLARP_SERVICE_IDENTITY_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <service/Info.hpp>
#include <service/IntroSet.hpp>
#include <service/types.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_INFO_HPP
#define LLARP_SERVICE_INFO_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <service/types.hpp>
#include <util/bencode.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_INTRO_HPP
#define LLARP_SERVICE_INTRO_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <path/path_types.hpp>
#include <util/bencode.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_INTROSET_HPP
#define LLARP_SERVICE_INTROSET_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <pow.hpp>
#include <service/Info.hpp>
#include <service/Intro.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_HANDLER_HPP
#define LLARP_SERVICE_HANDLER_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <path/path_types.hpp>
#include <service/IntroSet.hpp>
#include <util/aligned.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_SERVICE_PROTOCOL_HPP
#define LLARP_SERVICE_PROTOCOL_HPP
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <dht/message.hpp>
#include <encrypted.hpp>
#include <routing/message.hpp>

@ -1,7 +1,9 @@
#include <gtest/gtest.h>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <iostream>
#include <gtest/gtest.h>
namespace llarp
{
struct PQCryptoTest : public ::testing::Test

@ -1,6 +1,6 @@
#include <gtest/gtest.h>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <path/path.hpp>
#include <service/address.hpp>
#include <service/Identity.hpp>

@ -1,8 +1,10 @@
#include <gtest/gtest.h>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <encrypted_frame.hpp>
#include <messages/relay_commit.hpp>
#include <gtest/gtest.h>
using EncryptedFrame = llarp::EncryptedFrame;
using SecretKey = llarp::SecretKey;
using PubKey = llarp::PubKey;

@ -1,6 +1,5 @@
#include <router.hpp>
#include <crypto.hpp>
#include <crypto/crypto.hpp>
#include <functional>
#include <random>

@ -1,7 +1,7 @@
#include <gtest/gtest.h>
#include <crypto/crypto.hpp>
#include <router_contact.hpp>
#include <crypto.hpp>
static const byte_t DEF_VALUE[] = "unittest";

Loading…
Cancel
Save