mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
exclude AESNI option
Some checks are pending
Build Debian packages / ${{ matrix.dist }} (bookworm) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (bullseye) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (buster) (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (OFF) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (ON) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (i386, linux/386) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (amd64, linux/amd64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (arm64, linux/arm64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (armv7, linux/arm/v7) (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
Some checks are pending
Build Debian packages / ${{ matrix.dist }} (bookworm) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (bullseye) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (buster) (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (OFF) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (ON) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (i386, linux/386) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (amd64, linux/amd64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (arm64, linux/arm64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (armv7, linux/arm/v7) (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
This commit is contained in:
parent
65da550d19
commit
48b62340cc
1
Makefile
1
Makefile
|
@ -29,7 +29,6 @@ DAEMON_SRC_DIR := daemon
|
||||||
# import source files lists
|
# import source files lists
|
||||||
include filelist.mk
|
include filelist.mk
|
||||||
|
|
||||||
USE_AESNI := $(or $(USE_AESNI),yes)
|
|
||||||
USE_STATIC := $(or $(USE_STATIC),no)
|
USE_STATIC := $(or $(USE_STATIC),no)
|
||||||
USE_UPNP := $(or $(USE_UPNP),no)
|
USE_UPNP := $(or $(USE_UPNP),no)
|
||||||
DEBUG := $(or $(DEBUG),yes)
|
DEBUG := $(or $(DEBUG),yes)
|
||||||
|
|
|
@ -30,13 +30,6 @@ ifeq ($(USE_UPNP),yes)
|
||||||
INCFLAGS += -I${UPNPROOT}/include
|
INCFLAGS += -I${UPNPROOT}/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
|
||||||
ifneq (, $(findstring i386, $(SYS))$(findstring i686, $(SYS))$(findstring x86_64, $(SYS))) # only x86-based CPU supports that
|
|
||||||
NEEDED_CXXFLAGS += -maes
|
|
||||||
DEFINES += -D__AES__
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -d ${PREFIX}/bin
|
install -d ${PREFIX}/bin
|
||||||
install -m 755 ${I2PD} ${PREFIX}/bin
|
install -m 755 ${I2PD} ${PREFIX}/bin
|
||||||
|
|
|
@ -51,13 +51,6 @@ ifeq ($(USE_UPNP),yes)
|
||||||
DEFINES += -DUSE_UPNP
|
DEFINES += -DUSE_UPNP
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
|
||||||
ifneq (, $(findstring i386, $(SYS))$(findstring i686, $(SYS))$(findstring x86_64, $(SYS))) # only x86-based CPU supports that
|
|
||||||
NEEDED_CXXFLAGS += -maes
|
|
||||||
DEFINES += -D__AES__
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -d ${PREFIX}/bin
|
install -d ${PREFIX}/bin
|
||||||
install -m 755 ${I2PD} ${PREFIX}/bin
|
install -m 755 ${I2PD} ${PREFIX}/bin
|
||||||
|
|
|
@ -42,12 +42,6 @@ ifeq ($(USE_WIN32_APP), yes)
|
||||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
|
||||||
NEEDED_CXXFLAGS += -maes
|
|
||||||
LDFLAGS += -maes
|
|
||||||
DEFINES += -D__AES__
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_ASLR),yes)
|
ifeq ($(USE_ASLR),yes)
|
||||||
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
|
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -25,9 +25,5 @@ endif
|
||||||
OSARCH = $(shell uname -p)
|
OSARCH = $(shell uname -p)
|
||||||
|
|
||||||
ifneq ($(OSARCH),powerpc)
|
ifneq ($(OSARCH),powerpc)
|
||||||
ifeq ($(USE_AESNI),yes)
|
CXXFLAGS += -msse
|
||||||
CXXFLAGS += -D__AES__ -maes
|
|
||||||
else
|
|
||||||
CXXFLAGS += -msse
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -29,7 +29,6 @@ project(
|
||||||
)
|
)
|
||||||
|
|
||||||
# configurable options
|
# configurable options
|
||||||
option(WITH_AESNI "Use AES-NI instructions set" ON)
|
|
||||||
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
||||||
option(WITH_LIBRARY "Build library" ON)
|
option(WITH_LIBRARY "Build library" ON)
|
||||||
option(WITH_BINARY "Build binary" ON)
|
option(WITH_BINARY "Build binary" ON)
|
||||||
|
@ -185,16 +184,6 @@ if(UNIX)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Note: AES-NI and AVX is available on x86-based CPU's.
|
|
||||||
# Here also ARM64 implementation, but currently we don't support it.
|
|
||||||
# MSVC is not supported due to different ASM processing, so we hope OpenSSL has its own checks to run optimized code.
|
|
||||||
if(WITH_AESNI AND (ARCHITECTURE MATCHES "x86_64" OR ARCHITECTURE MATCHES "i386"))
|
|
||||||
if(NOT MSVC)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
|
||||||
endif()
|
|
||||||
add_definitions(-D__AES__)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_ADDRSANITIZER)
|
if(WITH_ADDRSANITIZER)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||||
|
@ -335,7 +324,6 @@ message(STATUS "Architecture : ${ARCHITECTURE}")
|
||||||
message(STATUS "Compiler flags : ${CMAKE_CXX_FLAGS}")
|
message(STATUS "Compiler flags : ${CMAKE_CXX_FLAGS}")
|
||||||
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
||||||
message(STATUS "Options:")
|
message(STATUS "Options:")
|
||||||
message(STATUS " AESNI : ${WITH_AESNI}")
|
|
||||||
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
||||||
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
||||||
message(STATUS " BINARY : ${WITH_BINARY}")
|
message(STATUS " BINARY : ${WITH_BINARY}")
|
||||||
|
|
|
@ -149,12 +149,10 @@ namespace util
|
||||||
LogPrint(eLogDebug, "FS: Certificates directory: ", certsdir);
|
LogPrint(eLogDebug, "FS: Certificates directory: ", certsdir);
|
||||||
|
|
||||||
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
||||||
bool aesni; i2p::config::GetOption("cpuext.aesni", aesni);
|
|
||||||
bool forceCpuExt; i2p::config::GetOption("cpuext.force", forceCpuExt);
|
|
||||||
bool ssu; i2p::config::GetOption("ssu", ssu);
|
bool ssu; i2p::config::GetOption("ssu", ssu);
|
||||||
if (!ssu && i2p::config::IsDefault ("precomputation.elgamal"))
|
if (!ssu && i2p::config::IsDefault ("precomputation.elgamal"))
|
||||||
precomputation = false; // we don't elgamal table if no ssu, unless it's specified explicitly
|
precomputation = false; // we don't elgamal table if no ssu, unless it's specified explicitly
|
||||||
i2p::crypto::InitCrypto (precomputation, aesni, forceCpuExt);
|
i2p::crypto::InitCrypto (precomputation);
|
||||||
|
|
||||||
i2p::transport::InitAddressFromIface (); // get address4/6 from interfaces
|
i2p::transport::InitAddressFromIface (); // get address4/6 from interfaces
|
||||||
|
|
||||||
|
|
|
@ -315,11 +315,11 @@ namespace config {
|
||||||
("persist.addressbook", value<bool>()->default_value(true), "Persist full addresses (default: true)")
|
("persist.addressbook", value<bool>()->default_value(true), "Persist full addresses (default: true)")
|
||||||
;
|
;
|
||||||
|
|
||||||
options_description cpuext("CPU encryption extensions options");
|
options_description cpuext("CPU encryption extensions options. Deprecated");
|
||||||
cpuext.add_options()
|
cpuext.add_options()
|
||||||
("cpuext.aesni", bool_switch()->default_value(true), "Use auto detection for AESNI CPU extensions. If false, AESNI will be not used")
|
("cpuext.aesni", bool_switch()->default_value(true), "Deprecated option")
|
||||||
("cpuext.avx", bool_switch()->default_value(false), "Deprecated option")
|
("cpuext.avx", bool_switch()->default_value(false), "Deprecated option")
|
||||||
("cpuext.force", bool_switch()->default_value(false), "Force usage of CPU extensions. Useful when cpuinfo is not available on virtual machines")
|
("cpuext.force", bool_switch()->default_value(false), "Deprecated option")
|
||||||
;
|
;
|
||||||
|
|
||||||
options_description meshnets("Meshnet transports options");
|
options_description meshnets("Meshnet transports options");
|
||||||
|
|
|
@ -834,7 +834,7 @@ namespace crypto
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void InitCrypto (bool precomputation, bool aesni, bool force)
|
void InitCrypto (bool precomputation)
|
||||||
{
|
{
|
||||||
/* auto numLocks = CRYPTO_num_locks();
|
/* auto numLocks = CRYPTO_num_locks();
|
||||||
for (int i = 0; i < numLocks; i++)
|
for (int i = 0; i < numLocks; i++)
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace crypto
|
||||||
void InitNoiseIKState (NoiseSymmetricState& state, const uint8_t * pub); // Noise_IK (ratchets)
|
void InitNoiseIKState (NoiseSymmetricState& state, const uint8_t * pub); // Noise_IK (ratchets)
|
||||||
|
|
||||||
// init and terminate
|
// init and terminate
|
||||||
void InitCrypto (bool precomputation, bool aesni, bool force);
|
void InitCrypto (bool precomputation);
|
||||||
void TerminateCrypto ();
|
void TerminateCrypto ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,9 +37,7 @@ namespace api
|
||||||
i2p::fs::Init();
|
i2p::fs::Init();
|
||||||
|
|
||||||
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
||||||
bool aesni; i2p::config::GetOption("cpuext.aesni", aesni);
|
i2p::crypto::InitCrypto (precomputation);
|
||||||
bool forceCpuExt; i2p::config::GetOption("cpuext.force", forceCpuExt);
|
|
||||||
i2p::crypto::InitCrypto (precomputation, aesni, forceCpuExt);
|
|
||||||
|
|
||||||
int netID; i2p::config::GetOption("netid", netID);
|
int netID; i2p::config::GetOption("netid", netID);
|
||||||
i2p::context.SetNetID (netID);
|
i2p::context.SetNetID (netID);
|
||||||
|
|
Loading…
Reference in a new issue