diff options
Diffstat (limited to 'package/libs/openssl/patches')
10 files changed, 353 insertions, 0 deletions
diff --git a/package/libs/openssl/patches/110-optimize-for-size.patch b/package/libs/openssl/patches/110-optimize-for-size.patch new file mode 100644 index 000000000..f30101786 --- /dev/null +++ b/package/libs/openssl/patches/110-optimize-for-size.patch @@ -0,0 +1,13 @@ +--- a/Configure ++++ b/Configure +@@ -401,6 +401,10 @@ my %table=( + "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", + "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", + ++# OpenWrt targets ++"linux-mips-openwrt","gcc:-DTERMIO \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"linux-generic-openwrt","gcc:-DTERMIO \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ + # Android: linux-* but without -DTERMIO and pointers to headers and libs. + "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", diff --git a/package/libs/openssl/patches/130-perl-path.patch b/package/libs/openssl/patches/130-perl-path.patch new file mode 100644 index 000000000..dd4fa54d5 --- /dev/null +++ b/package/libs/openssl/patches/130-perl-path.patch @@ -0,0 +1,64 @@ +--- a/Configure ++++ b/Configure +@@ -1,4 +1,4 @@ +-: ++#!/usr/bin/perl + eval 'exec perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + ## +--- a/tools/c_rehash.in ++++ b/tools/c_rehash.in +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + + # Perl c_rehash script, scan all files in a directory +--- a/util/clean-depend.pl ++++ b/util/clean-depend.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + # Clean the dependency list in a makefile of standard includes... + # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 + +--- a/util/mkdef.pl ++++ b/util/mkdef.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + # + # generate a .def file + # +--- a/util/mkerr.pl ++++ b/util/mkerr.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + + my $config = "crypto/err/openssl.ec"; + my $hprefix = "openssl/"; +--- a/util/mkstack.pl ++++ b/util/mkstack.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + + # This is a utility that searches out "DECLARE_STACK_OF()" + # declarations in .h and .c files, and updates/creates/replaces +--- a/util/pod2man.pl ++++ b/util/pod2man.pl +@@ -1,4 +1,4 @@ +-: #!/usr/bin/perl-5.005 ++#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +--- a/util/selftest.pl ++++ b/util/selftest.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + # + # Run the test suite and generate a report + # diff --git a/package/libs/openssl/patches/140-makefile-dirs.patch b/package/libs/openssl/patches/140-makefile-dirs.patch new file mode 100644 index 000000000..b51ca28b6 --- /dev/null +++ b/package/libs/openssl/patches/140-makefile-dirs.patch @@ -0,0 +1,11 @@ +--- a/Makefile.org ++++ b/Makefile.org +@@ -135,7 +135,7 @@ FIPSCANLIB= + + BASEADDR= + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl apps + ENGDIRS= ccgost + SHLIBDIRS= crypto ssl + diff --git a/package/libs/openssl/patches/150-no_engines.patch b/package/libs/openssl/patches/150-no_engines.patch new file mode 100644 index 000000000..62aacc1e4 --- /dev/null +++ b/package/libs/openssl/patches/150-no_engines.patch @@ -0,0 +1,81 @@ +--- a/Configure ++++ b/Configure +@@ -2000,6 +2000,11 @@ EOF + close(OUT); + } + ++# ugly hack to disable engines ++if($target eq "mingwx") { ++ system("sed -e s/^LIB/XLIB/g -i engines/Makefile"); ++} ++ + print <<EOF; + + Configured for $target. +--- a/util/libeay.num ++++ b/util/libeay.num +@@ -2071,7 +2071,6 @@ PKCS7_ATTR_SIGN_it + UI_add_error_string 2633 EXIST::FUNCTION: + KRB5_CHECKSUM_free 2634 EXIST::FUNCTION: + OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION: +-ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + ENGINE_register_all_digests 2637 EXIST::FUNCTION:ENGINE + PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +@@ -2545,7 +2544,6 @@ OCSP_RESPONSE_new + AES_set_encrypt_key 3024 EXIST::FUNCTION:AES + OCSP_resp_count 3025 EXIST::FUNCTION: + KRB5_CHECKSUM_new 3026 EXIST::FUNCTION: +-ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OCSP_onereq_get0_id 3028 EXIST::FUNCTION: + ENGINE_set_default_ciphers 3029 EXIST::FUNCTION:ENGINE + NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +@@ -2576,7 +2574,6 @@ ASN1_primitive_free + i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION: + i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION: + asn1_enc_save 3054 EXIST::FUNCTION: +-ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + _ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES + PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +@@ -2600,7 +2597,6 @@ asn1_get_choice_selector + i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION: + ENGINE_set_table_flags 3073 EXIST::FUNCTION:ENGINE + AES_options 3074 EXIST::FUNCTION:AES +-ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OCSP_id_cmp 3076 EXIST::FUNCTION: + OCSP_BASICRESP_new 3077 EXIST::FUNCTION: + OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION: +@@ -2667,7 +2663,6 @@ OCSP_CRLID_it + OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: + i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION: + OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION: +-ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: + USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +@@ -2762,8 +2757,6 @@ DES_read_2passwords + DES_read_password 3207 EXIST::FUNCTION:DES + UI_UTIL_read_pw 3208 EXIST::FUNCTION: + UI_UTIL_read_pw_string 3209 EXIST::FUNCTION: +-ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE,STATIC_ENGINE +-ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION: + OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION: + OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION: +@@ -2772,7 +2765,6 @@ OPENSSL_load_builtin_modules + AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES + AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES + AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES +-ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES + EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES + EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES +@@ -3107,7 +3099,6 @@ EC_GFp_nist_method + STORE_meth_set_modify_fn 3530 NOEXIST::FUNCTION: + STORE_method_set_modify_function 3530 NOEXIST::FUNCTION: + STORE_parse_attrs_next 3531 NOEXIST::FUNCTION: +-ENGINE_load_padlock 3532 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + EC_GROUP_set_curve_name 3533 EXIST::FUNCTION:EC + X509_CERT_PAIR_it 3534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + X509_CERT_PAIR_it 3534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: diff --git a/package/libs/openssl/patches/160-disable_doc_tests.patch b/package/libs/openssl/patches/160-disable_doc_tests.patch new file mode 100644 index 000000000..b6dacc1f7 --- /dev/null +++ b/package/libs/openssl/patches/160-disable_doc_tests.patch @@ -0,0 +1,58 @@ +--- a/Makefile ++++ b/Makefile +@@ -137,7 +137,7 @@ FIPSCANLIB= + + BASEADDR=0xFB00000 + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl engines apps tools + ENGDIRS= ccgost + SHLIBDIRS= crypto ssl + +@@ -155,7 +155,7 @@ SDIRS= \ + + # tests to perform. "alltests" is a special word indicating that all tests + # should be performed. +-TESTS = alltests ++TESTS = + + MAKEFILE= Makefile + +@@ -169,7 +169,7 @@ SHELL=/bin/sh + + TOP= . + ONEDIRS=out tmp +-EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS ++EDIRS= times bugs util include certs ms shlib mt demos perl sf dep VMS + WDIRS= windows + LIBS= libcrypto.a libssl.a + SHARED_CRYPTO=libcrypto$(SHLIB_EXT) +@@ -270,7 +270,7 @@ reflect: + @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) + + sub_all: build_all +-build_all: build_libs build_apps build_tests build_tools ++build_all: build_libs build_apps build_tools + + build_libs: build_crypto build_ssl build_engines + +@@ -539,7 +539,7 @@ dist: + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ +--- a/Makefile.org ++++ b/Makefile.org +@@ -537,7 +537,7 @@ dist: + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ diff --git a/package/libs/openssl/patches/170-bash_path.patch b/package/libs/openssl/patches/170-bash_path.patch new file mode 100644 index 000000000..c29b59afd --- /dev/null +++ b/package/libs/openssl/patches/170-bash_path.patch @@ -0,0 +1,8 @@ +--- a/util/domd ++++ b/util/domd +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/usr/bin/env bash + # Do a makedepend, only leave out the standard headers + # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 + diff --git a/package/libs/openssl/patches/180-fix_link_segfault.patch b/package/libs/openssl/patches/180-fix_link_segfault.patch new file mode 100644 index 000000000..3e36beb49 --- /dev/null +++ b/package/libs/openssl/patches/180-fix_link_segfault.patch @@ -0,0 +1,18 @@ +--- a/Makefile.shared ++++ b/Makefile.shared +@@ -95,7 +95,6 @@ LINK_APP= \ + LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ +- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ + $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} ) + + LINK_SO= \ +@@ -105,7 +104,6 @@ LINK_SO= \ + SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ +- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ + $${SHAREDCMD} $${SHAREDFLAGS} \ + -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ + $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \ diff --git a/package/libs/openssl/patches/190-remove_timestamp_check.patch b/package/libs/openssl/patches/190-remove_timestamp_check.patch new file mode 100644 index 000000000..2677b2d6f --- /dev/null +++ b/package/libs/openssl/patches/190-remove_timestamp_check.patch @@ -0,0 +1,23 @@ +--- a/Makefile.org ++++ b/Makefile.org +@@ -184,7 +184,7 @@ WTARFILE= $(NAME)-win.tar + EXHEADER= e_os2.h + HEADER= e_os.h + +-all: Makefile build_all openssl.pc libssl.pc libcrypto.pc ++all: build_all openssl.pc libssl.pc libcrypto.pc + + # as we stick to -e, CLEARENV ensures that local variables in lower + # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn +@@ -396,11 +396,6 @@ openssl.pc: Makefile + echo 'Libs.private: $(EX_LIBS)'; \ + echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc + +-Makefile: Makefile.org Configure config +- @echo "Makefile is older than Makefile.org, Configure or config." +- @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." +- @false +- + libclean: + rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib + diff --git a/package/libs/openssl/patches/200-etrax_support.patch b/package/libs/openssl/patches/200-etrax_support.patch new file mode 100644 index 000000000..9bd155e37 --- /dev/null +++ b/package/libs/openssl/patches/200-etrax_support.patch @@ -0,0 +1,13 @@ +--- a/Configure ++++ b/Configure +@@ -440,6 +440,10 @@ my %table=( + "beos-x86-r5", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lnet:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC -DPIC:-shared:.so", + "beos-x86-bone", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lbind -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC:-shared:.so", + ++# cris ++"linux-cris", "\$(TARGET_CC):-DL_ENDIAN -DTERMIO -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG THIRTY_TWO_BIT RC4_CHAR::::::::::::dlfcn:linux-shared:-fpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", ++ ++ + #### SCO/Caldera targets. + # + # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. diff --git a/package/libs/openssl/patches/210-fix_aes_mips.patch b/package/libs/openssl/patches/210-fix_aes_mips.patch new file mode 100644 index 000000000..bbfc63a41 --- /dev/null +++ b/package/libs/openssl/patches/210-fix_aes_mips.patch @@ -0,0 +1,64 @@ +--- a/crypto/aes/asm/aes-mips.pl ++++ b/crypto/aes/asm/aes-mips.pl +@@ -1036,9 +1036,9 @@ _mips_AES_set_encrypt_key: + nop + .end _mips_AES_set_encrypt_key + +-.globl AES_set_encrypt_key +-.ent AES_set_encrypt_key +-AES_set_encrypt_key: ++.globl private_AES_set_encrypt_key ++.ent private_AES_set_encrypt_key ++private_AES_set_encrypt_key: + .frame $sp,$FRAMESIZE,$ra + .mask $SAVED_REGS_MASK,-$SZREG + .set noreorder +@@ -1060,7 +1060,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # + ___ + $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification + .cplocal $Tbl +- .cpsetup $pf,$zero,AES_set_encrypt_key ++ .cpsetup $pf,$zero,private_AES_set_encrypt_key + ___ + $code.=<<___; + .set reorder +@@ -1083,7 +1083,7 @@ ___ + $code.=<<___; + jr $ra + $PTR_ADD $sp,$FRAMESIZE +-.end AES_set_encrypt_key ++.end private_AES_set_encrypt_key + ___ + + my ($head,$tail)=($inp,$bits); +@@ -1091,9 +1091,9 @@ my ($tp1,$tp2,$tp4,$tp8,$tp9,$tpb,$tpd,$ + my ($m,$x80808080,$x7f7f7f7f,$x1b1b1b1b)=($at,$t0,$t1,$t2); + $code.=<<___; + .align 5 +-.globl AES_set_decrypt_key +-.ent AES_set_decrypt_key +-AES_set_decrypt_key: ++.globl private_AES_set_decrypt_key ++.ent private_AES_set_decrypt_key ++private_AES_set_decrypt_key: + .frame $sp,$FRAMESIZE,$ra + .mask $SAVED_REGS_MASK,-$SZREG + .set noreorder +@@ -1115,7 +1115,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # + ___ + $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification + .cplocal $Tbl +- .cpsetup $pf,$zero,AES_set_decrypt_key ++ .cpsetup $pf,$zero,private_AES_set_decrypt_key + ___ + $code.=<<___; + .set reorder +@@ -1226,7 +1226,7 @@ ___ + $code.=<<___; + jr $ra + $PTR_ADD $sp,$FRAMESIZE +-.end AES_set_decrypt_key ++.end private_AES_set_decrypt_key + ___ + }}} + |