diff --git a/project/jni/openssl/compile.sh b/project/jni/openssl/compile.sh index 750638d16..d9630bfa3 100755 --- a/project/jni/openssl/compile.sh +++ b/project/jni/openssl/compile.sh @@ -94,10 +94,7 @@ else fi rm -rf include -mkdir -p include -cp -r -L build/arm64-v8a/include/openssl include/openssl || exit 1 -patch -p0 < opensslconf.h.patch || exit 1 -sed -i.tmp 's@".*/dist/.*"@"."@g' include/openssl/opensslconf.h -rm -f include/openssl/opensslconf.h.tmp +cp -r -L build/arm64-v8a/include ./ || exit 1 +patch -p1 < opensslconf.h.patch || exit 1 rm -rf build diff --git a/project/jni/openssl/opensslconf.h.patch b/project/jni/openssl/opensslconf.h.patch index e252f3df7..abd11c236 100644 --- a/project/jni/openssl/opensslconf.h.patch +++ b/project/jni/openssl/opensslconf.h.patch @@ -1,19 +1,37 @@ -diff -u -r include/openssl/opensslconf.h include/openssl/opensslconf.h ---- include/openssl/opensslconf.h 2018-06-27 21:41:35.243331385 +0300 -+++ include/openssl/opensslconf.h 2018-06-27 22:00:56.341328455 +0300 -@@ -157,10 +157,13 @@ - #if !defined(OPENSSL_SYS_UEFI) - # define BN_LLONG +diff -u -r arm64-v8a-old/include/crypto/bn_conf.h arm64-v8a/include/crypto/bn_conf.h +--- arm64-v8a-old/include/crypto/bn_conf.h 2021-03-12 23:45:55.475710837 +0200 ++++ arm64-v8a/include/crypto/bn_conf.h 2021-03-13 00:52:09.517668615 +0200 +@@ -21,8 +21,13 @@ + /* Should we define BN_DIV2W here? */ + /* Only one for the following should be defined */ --# undef SIXTY_FOUR_BIT_LONG --# undef SIXTY_FOUR_BIT +-#define SIXTY_FOUR_BIT_LONG ++#undef SIXTY_FOUR_BIT_LONG + #undef SIXTY_FOUR_BIT + #undef THIRTY_TWO_BIT +#ifdef __LP64__ -+# define SIXTY_FOUR_BIT_LONG -+# define SIXTY_FOUR_BIT ++#define SIXTY_FOUR_BIT_LONG +#else - # define THIRTY_TWO_BIT - #endif ++#define THIRTY_TWO_BIT +#endif - #define RC4_INT unsigned char + #endif +diff -u -r arm64-v8a-old/include/openssl/opensslconf.h arm64-v8a/include/openssl/opensslconf.h +--- arm64-v8a-old/include/openssl/opensslconf.h 2021-03-12 23:45:55.475710837 +0200 ++++ arm64-v8a/include/openssl/opensslconf.h 2021-03-13 00:53:06.261987869 +0200 +@@ -188,9 +188,14 @@ + #if !defined(OPENSSL_SYS_UEFI) + # undef BN_LLONG + /* Only one for the following should be defined */ +-# define SIXTY_FOUR_BIT_LONG ++# undef SIXTY_FOUR_BIT_LONG + # undef SIXTY_FOUR_BIT + # undef THIRTY_TWO_BIT ++# ifdef __LP64__ ++# define SIXTY_FOUR_BIT_LONG ++# else ++# define THIRTY_TWO_BIT ++# endif + #endif + #define RC4_INT unsigned char