Browse Source

Merge pull request #1166 from borned-mind/openssl

Disable aesenc for arm64
pull/1168/head
orignal 7 years ago committed by GitHub
parent
commit
cb81195959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Makefile.linux
  2. 7
      libi2pd/Crypto.cpp
  3. 3
      libi2pd/Crypto.h

7
Makefile.linux

@ -60,7 +60,12 @@ endif @@ -60,7 +60,12 @@ endif
ifeq ($(USE_AESNI),yes)
#check if AES-NI is supported by CPU
ifneq ($(shell $(GREP) -c aes /proc/cpuinfo),0)
CPU_FLAGS += -maes -DAESNI
machine := $(shell uname -m)
ifeq ($(machine), aarch64)
CXXFLAGS += -DARM64AES
else
CPU_FLAGS += -maes -DAESNI
endif
endif
endif

7
libi2pd/Crypto.cpp

@ -594,6 +594,13 @@ namespace crypto @@ -594,6 +594,13 @@ namespace crypto
// AES
#ifdef AESNI
#ifdef ARM64AES
void init_aesenc(void) __attribute__((constructor)){
}
#endif
#define KeyExpansion256(round0,round1) \
"pshufd $0xff, %%xmm2, %%xmm2 \n" \
"movaps %%xmm1, %%xmm4 \n" \

3
libi2pd/Crypto.h

@ -124,6 +124,9 @@ namespace crypto @@ -124,6 +124,9 @@ namespace crypto
#ifdef AESNI
#ifdef ARM64AES
void init_aesenc(void) __attribute__((constructor));
#endif
class ECBCryptoAESNI
{
public:

Loading…
Cancel
Save