diff --git a/libports/lib/import/import-libssl.mk b/libports/lib/import/import-libssl.mk new file mode 100644 index 0000000000..d1175dc79a --- /dev/null +++ b/libports/lib/import/import-libssl.mk @@ -0,0 +1,10 @@ +REP_INC_DIR += include/openssl + +ifeq ($(filter-out $(SPECS),x86_32),) +TARGET_CPUARCH=x86_32 +else ifeq ($(filter-out $(SPECS),x86_64),) +TARGET_CPUARCH=x86_64 +endif + +# include architecture specific opensslconf.h +REP_INC_DIR += src/lib/openssl/$(TARGET_CPUARCH) diff --git a/libports/lib/mk/libcrypto.mk b/libports/lib/mk/libcrypto.mk index 607db363e4..a3dd08a26f 100644 --- a/libports/lib/mk/libcrypto.mk +++ b/libports/lib/mk/libcrypto.mk @@ -1,5 +1,5 @@ LIBCRYPTO = libcrypto-1.0.0 -LIBCRYPTO_DIR = $(REP_DIR)/contrib/openssl-1.0.1b/crypto +LIBCRYPTO_DIR = $(REP_DIR)/contrib/openssl-1.0.1c/crypto # # ARM is not supported currently (needs testing) @@ -10,15 +10,13 @@ SHARED_LIB = yes LIBS += libc -CC_OPT += -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIOS +CC_OPT += -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIOS \ + -DOPENSSL_NO_ASM # # crypto base source # -# Removed 'mem_clr.c' from the list because this function is provided by -# 'src/lib/openssl/x86_32/cpuid.s'. -# -SRC_C = cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \ +SRC_C = cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c mem_clr.c \ ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c # @@ -208,9 +206,6 @@ endif INC_DIR += $(REP_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/ -#SRC_S += $(REP_DIR)/src/lib/openssl/$(TARGET_CPUARCH)/aes_enc.s -SRC_S += cpuid.s - # # Generate buildinf.h diff --git a/libports/lib/mk/libssl.mk b/libports/lib/mk/libssl.mk index 0f2f979e9a..7a850138fc 100644 --- a/libports/lib/mk/libssl.mk +++ b/libports/lib/mk/libssl.mk @@ -1,5 +1,5 @@ LIBSSL = libssl-1.0.0 -LIBSSL_DIR = $(REP_DIR)/contrib/openssl-1.0.1b +LIBSSL_DIR = $(REP_DIR)/contrib/openssl-1.0.1c # # ARM is not supported currently (needs testing) diff --git a/libports/ports/openssl.mk b/libports/ports/openssl.mk index 7bd81f5e2e..dc37efdd51 100644 --- a/libports/ports/openssl.mk +++ b/libports/ports/openssl.mk @@ -1,4 +1,4 @@ -OPENSSL_VERSION = 1.0.1b +OPENSSL_VERSION = 1.0.1c OPENSSL = openssl-$(OPENSSL_VERSION) OPENSSL_TGZ = $(OPENSSL).tar.gz OPENSSL_URL = https://www.openssl.org/source/$(OPENSSL_TGZ) @@ -28,25 +28,7 @@ $(CONTRIB_DIR)/$(OPENSSL): $(DOWNLOAD_DIR)/$(OPENSSL_TGZ) # Generate ASM codes # -generate_asm: $(OPENSSL_SRC)/x86_32/cpuid.s $(OPENSSL_SRC)/x86_64/cpuid.s \ - $(OPENSSL_SRC)/x86_32/aes_enc.s $(OPENSSL_SRC)/x86_64/aes_enc.s \ - $(OPENSSL_SRC)/x86_64/modexp512.s $(OPENSSL_SRC)/x86_64/rc4_md5.s - -$(OPENSSL_SRC)/x86_32/cpuid.s: - $(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/x86cpuid.pl elf \ - $(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@ - -$(OPENSSL_SRC)/x86_64/cpuid.s: - $(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/x86_64cpuid.pl elf \ - $(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@ - -$(OPENSSL_SRC)/x86_32/aes_enc.s: - $(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/aes/asm/aes-586.pl elf \ - $(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@ - -$(OPENSSL_SRC)/x86_64/aes_enc.s: - $(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/aes/asm/aes-x86_64.pl elf \ - $(CONTRIB_DIR)/$(OPENSSEL)/crypto/perlasm/x86asm.pl elf > $@ +generate_asm: $(OPENSSL_SRC)/x86_64/modexp512.s $(OPENSSL_SRC)/x86_64/rc4_md5.s $(OPENSSL_SRC)/x86_64/modexp512.s: $(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/bn/asm/modexp512-x86_64.pl \ @@ -71,6 +53,6 @@ include/openssl: $(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/crypto/store/store.h include/openssl/ clean-openssl: - $(VERBOSE)rm -rf include/OPENSSL + $(VERBOSE)rm -rf include/openssl $(VERBOSE)rm -rf $(CONTRIB_DIR)/$(OPENSSL) $(VERBOSE)rm -rf $(OPENSSL_SRC)/x86_32/*.s $(OPENSSL_SRC)/x86_64/*.s diff --git a/libports/src/lib/openssl/x86_32/openssl/opensslconf.h b/libports/src/lib/openssl/x86_32/openssl/opensslconf.h index 351277af73..5d3e88ea42 100644 --- a/libports/src/lib/openssl/x86_32/openssl/opensslconf.h +++ b/libports/src/lib/openssl/x86_32/openssl/opensslconf.h @@ -67,8 +67,6 @@ # endif #endif -#define OPENSSL_CPUID_OBJ - /* crypto/opensslconf.h.in */ /* Generate 80386 code? */ diff --git a/libports/src/lib/openssl/x86_64/openssl/opensslconf.h b/libports/src/lib/openssl/x86_64/openssl/opensslconf.h index 1dbcd76b85..0fe4e28840 100644 --- a/libports/src/lib/openssl/x86_64/openssl/opensslconf.h +++ b/libports/src/lib/openssl/x86_64/openssl/opensslconf.h @@ -67,8 +67,6 @@ # endif #endif -#define OPENSSL_CPUID_OBJ - /* crypto/opensslconf.h.in */ /* Generate 80386 code? */