diff --git a/Destination.cpp b/Destination.cpp index f19dbe72..0196e6b9 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -3,7 +3,7 @@ #include #include "Log.h" #include "util/util.h" -#include "ElGamal.h" +#include "crypto/ElGamal.h" #include "util/Timestamp.h" #include "NetDb.h" #include "AddressBook.h" diff --git a/Destination.h b/Destination.h index 7e73af95..fdad4426 100644 --- a/Destination.h +++ b/Destination.h @@ -11,7 +11,7 @@ #include #include "Identity.h" #include "TunnelPool.h" -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "LeaseSet.h" #include "Garlic.h" #include "NetDb.h" diff --git a/Garlic.h b/Garlic.h index da90250f..457b64e0 100644 --- a/Garlic.h +++ b/Garlic.h @@ -9,7 +9,7 @@ #include #include #include -#include "aes.h" +#include "crypto/aes.h" #include "I2NPProtocol.h" #include "LeaseSet.h" #include "util/Queue.h" diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index b59d0985..51127897 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -2,7 +2,7 @@ #include #include "I2PEndian.h" #include -#include "ElGamal.h" +#include "crypto/ElGamal.h" #include "util/Timestamp.h" #include "RouterContext.h" #include "NetDb.h" diff --git a/Identity.cpp b/Identity.cpp index 0d1a37db..80230630 100644 --- a/Identity.cpp +++ b/Identity.cpp @@ -4,8 +4,8 @@ #include #include #include "util/base64.h" -#include "CryptoConst.h" -#include "ElGamal.h" +#include "crypto/CryptoConst.h" +#include "crypto/ElGamal.h" #include "RouterContext.h" #include "Identity.h" #include "I2PEndian.h" diff --git a/Identity.h b/Identity.h index 7f36545d..3388b150 100644 --- a/Identity.h +++ b/Identity.h @@ -6,8 +6,8 @@ #include #include #include "util/base64.h" -#include "ElGamal.h" -#include "Signature.h" +#include "crypto/ElGamal.h" +#include "crypto/Signature.h" namespace i2p { diff --git a/LeaseSet.cpp b/LeaseSet.cpp index 22bc4267..c815b1ec 100644 --- a/LeaseSet.cpp +++ b/LeaseSet.cpp @@ -2,7 +2,7 @@ #include "I2PEndian.h" #include #include -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "Log.h" #include "util/Timestamp.h" #include "NetDb.h" diff --git a/Makefile b/Makefile index f48357f2..e97812fa 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ mk_build_dir: mkdir -p obj mkdir -p obj/transport mkdir -p obj/util + mkdir -p obj/crypto mk_build_test_dir: mkdir -p obj/tests @@ -47,6 +48,7 @@ deps: @mkdir -p obj/transport @mkdir -p obj/tests @mkdir -p obj/util + @mkdir -p obj/crypto $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) -MM *.cpp > $(DEPS) @sed -i -e '/\.o:/ s/^/obj\//' $(DEPS) @@ -55,6 +57,7 @@ obj/%.o : %.cpp @mkdir -p obj/transport @mkdir -p obj/tests @mkdir -p obj/util + @mkdir -p obj/crypto $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< # '-' is 'ignore if missing' on first run diff --git a/Reseed.cpp b/Reseed.cpp index 4e3b4563..63cdaa21 100644 --- a/Reseed.cpp +++ b/Reseed.cpp @@ -15,7 +15,7 @@ #include "Reseed.h" #include "Log.h" #include "Identity.h" -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "NetDb.h" #include "util/util.h" diff --git a/Reseed.h b/Reseed.h index cdd76858..a18ccd67 100644 --- a/Reseed.h +++ b/Reseed.h @@ -9,7 +9,7 @@ #include #include #include "Identity.h" -#include "aes.h" +#include "crypto/aes.h" namespace i2p { diff --git a/RouterContext.cpp b/RouterContext.cpp index ac2358b1..7032ea66 100644 --- a/RouterContext.cpp +++ b/RouterContext.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "RouterContext.h" #include "util/Timestamp.h" #include "I2NPProtocol.h" diff --git a/RouterInfo.cpp b/RouterInfo.cpp index b394d09d..2e30c90d 100644 --- a/RouterInfo.cpp +++ b/RouterInfo.cpp @@ -5,7 +5,7 @@ #include #include #include -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "util/base64.h" #include "util/Timestamp.h" #include "Log.h" diff --git a/TransitTunnel.h b/TransitTunnel.h index fea6d4eb..b92dca3c 100644 --- a/TransitTunnel.h +++ b/TransitTunnel.h @@ -5,7 +5,7 @@ #include #include #include -#include "aes.h" +#include "crypto/aes.h" #include "I2NPProtocol.h" #include "TunnelEndpoint.h" #include "TunnelGateway.h" diff --git a/TunnelConfig.h b/TunnelConfig.h index a77b560f..b121c8d6 100644 --- a/TunnelConfig.h +++ b/TunnelConfig.h @@ -5,7 +5,7 @@ #include #include #include -#include "aes.h" +#include "crypto/aes.h" #include "RouterInfo.h" #include "RouterContext.h" #include "util/Timestamp.h" diff --git a/TunnelPool.cpp b/TunnelPool.cpp index 18ffd8ae..598cc373 100644 --- a/TunnelPool.cpp +++ b/TunnelPool.cpp @@ -1,6 +1,6 @@ #include #include "I2PEndian.h" -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "Tunnel.h" #include "NetDb.h" #include "util/Timestamp.h" diff --git a/CryptoConst.cpp b/crypto/CryptoConst.cpp similarity index 100% rename from CryptoConst.cpp rename to crypto/CryptoConst.cpp diff --git a/CryptoConst.h b/crypto/CryptoConst.h similarity index 100% rename from CryptoConst.h rename to crypto/CryptoConst.h diff --git a/ElGamal.h b/crypto/ElGamal.h similarity index 100% rename from ElGamal.h rename to crypto/ElGamal.h diff --git a/Signature.cpp b/crypto/Signature.cpp similarity index 100% rename from Signature.cpp rename to crypto/Signature.cpp diff --git a/Signature.h b/crypto/Signature.h similarity index 100% rename from Signature.h rename to crypto/Signature.h diff --git a/aes.cpp b/crypto/aes.cpp similarity index 100% rename from aes.cpp rename to crypto/aes.cpp diff --git a/aes.h b/crypto/aes.h similarity index 100% rename from aes.h rename to crypto/aes.h diff --git a/hmac.h b/crypto/hmac.h similarity index 100% rename from hmac.h rename to crypto/hmac.h diff --git a/filelist.mk b/filelist.mk index 765c0255..5a8955fe 100644 --- a/filelist.mk +++ b/filelist.mk @@ -2,11 +2,12 @@ COMMON_SRC = \ transport/NTCPSession.cpp transport/SSU.cpp transport/SSUSession.cpp \ transport/SSUData.cpp transport/Transports.cpp \ util/util.cpp util/base64.cpp \ - CryptoConst.cpp Datagram.cpp Garlic.cpp I2NPProtocol.cpp LeaseSet.cpp \ + crypto/CryptoConst.cpp crypto/aes.cpp crypto/Signature.cpp \ + Datagram.cpp Garlic.cpp I2NPProtocol.cpp LeaseSet.cpp \ Log.cpp NetDb.cpp NetDbRequests.cpp Profiling.cpp Reseed.cpp \ - RouterContext.cpp RouterInfo.cpp Signature.cpp Streaming.cpp Identity.cpp \ + RouterContext.cpp RouterInfo.cpp Streaming.cpp Identity.cpp \ TransitTunnel.cpp Tunnel.cpp TunnelEndpoint.cpp TunnelPool.cpp \ - TunnelGateway.cpp Destination.cpp UPnP.cpp aes.cpp + TunnelGateway.cpp Destination.cpp UPnP.cpp ifeq ($(UNAME),Darwin) diff --git a/transport/NTCPSession.cpp b/transport/NTCPSession.cpp index 85b62252..4d6123f1 100644 --- a/transport/NTCPSession.cpp +++ b/transport/NTCPSession.cpp @@ -6,7 +6,7 @@ #include "util/base64.h" #include "Log.h" #include "util/Timestamp.h" -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "I2NPProtocol.h" #include "RouterContext.h" #include "Transports.h" diff --git a/transport/NTCPSession.h b/transport/NTCPSession.h index 7b99483e..2dbfd360 100644 --- a/transport/NTCPSession.h +++ b/transport/NTCPSession.h @@ -9,7 +9,7 @@ #include #include #include -#include "aes.h" +#include "crypto/aes.h" #include "Identity.h" #include "RouterInfo.h" #include "I2NPProtocol.h" diff --git a/transport/SSU.h b/transport/SSU.h index 54d9326a..7c756f01 100644 --- a/transport/SSU.h +++ b/transport/SSU.h @@ -9,7 +9,7 @@ #include #include #include -#include "aes.h" +#include "crypto/aes.h" #include "I2PEndian.h" #include "Identity.h" #include "RouterInfo.h" diff --git a/transport/SSUSession.cpp b/transport/SSUSession.cpp index e56f67ea..69a99125 100644 --- a/transport/SSUSession.cpp +++ b/transport/SSUSession.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "Log.h" #include "util/Timestamp.h" #include "RouterContext.h" diff --git a/transport/SSUSession.h b/transport/SSUSession.h index 427b81c8..f7194358 100644 --- a/transport/SSUSession.h +++ b/transport/SSUSession.h @@ -4,8 +4,8 @@ #include #include #include -#include "aes.h" -#include "hmac.h" +#include "crypto/aes.h" +#include "crypto/hmac.h" #include "I2NPProtocol.h" #include "TransportSession.h" #include "SSUData.h" diff --git a/transport/Transports.cpp b/transport/Transports.cpp index 52856c5f..623892ac 100644 --- a/transport/Transports.cpp +++ b/transport/Transports.cpp @@ -1,6 +1,6 @@ #include #include "Log.h" -#include "CryptoConst.h" +#include "crypto/CryptoConst.h" #include "RouterContext.h" #include "I2NPProtocol.h" #include "NetDb.h"