From 12dd8a394d801bfea5a733224cb10c14c1ec5635 Mon Sep 17 00:00:00 2001 From: EinMByte Date: Sun, 2 Aug 2015 23:18:55 +0200 Subject: [PATCH] Fix building without AESNI. --- build/CMakeLists.txt | 3 ++- tunnel/TunnelCrypto.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index f7f85a16..59fe111b 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -62,7 +62,8 @@ set (DAEMON_SRC "${CMAKE_SOURCE_DIR}/HTTPProxy.cpp" "${CMAKE_SOURCE_DIR}/HTTPServer.cpp" "${CMAKE_SOURCE_DIR}/I2PService.cpp" - "${CMAKE_SOURCE_DIR}/I2PControl.cpp" + "${CMAKE_SOURCE_DIR}/i2pcontrol/I2PControl.cpp" + "${CMAKE_SOURCE_DIR}/i2pcontrol/I2PServer.cpp" "${CMAKE_SOURCE_DIR}/I2PTunnel.cpp" "${CMAKE_SOURCE_DIR}/SAM.cpp" "${CMAKE_SOURCE_DIR}/SOCKS.cpp" diff --git a/tunnel/TunnelCrypto.cpp b/tunnel/TunnelCrypto.cpp index 834be06d..e24f6997 100644 --- a/tunnel/TunnelCrypto.cpp +++ b/tunnel/TunnelCrypto.cpp @@ -40,10 +40,10 @@ void TunnelEncryption::Encrypt (const uint8_t * in, uint8_t * out) : "%xmm0", "%xmm1", "cc", "memory" ); #else - m_IVEncryption.Encrypt ((const ChipherBlock *)in, (ChipherBlock *)out); // iv + m_IVEncryption.Encrypt ((const CipherBlock *)in, (CipherBlock *)out); // iv m_LayerEncryption.SetIV (out); m_LayerEncryption.Encrypt (in + 16, i2p::tunnel::TUNNEL_DATA_ENCRYPTED_SIZE, out + 16); // data - m_IVEncryption.Encrypt ((ChipherBlock *)out, (ChipherBlock *)out); // double iv + m_IVEncryption.Encrypt ((CipherBlock *)out, (CipherBlock *)out); // double iv #endif } @@ -77,10 +77,10 @@ void TunnelDecryption::Decrypt (const uint8_t * in, uint8_t * out) : "%xmm0", "%xmm1", "%xmm2", "cc", "memory" ); #else - m_IVDecryption.Decrypt ((const ChipherBlock *)in, (ChipherBlock *)out); // iv + m_IVDecryption.Decrypt ((const CipherBlock *)in, (CipherBlock *)out); // iv m_LayerDecryption.SetIV (out); m_LayerDecryption.Decrypt (in + 16, i2p::tunnel::TUNNEL_DATA_ENCRYPTED_SIZE, out + 16); // data - m_IVDecryption.Decrypt ((ChipherBlock *)out, (ChipherBlock *)out); // double iv + m_IVDecryption.Decrypt ((CipherBlock *)out, (CipherBlock *)out); // double iv #endif }