openssl 1.1.1 preparation patches

This commit is contained in:
Fredrik Fornwall 2018-08-24 02:34:07 +02:00
parent 3a7d393c3f
commit 3e6fbcef2f
7 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff -u -r ../otp-OTP-21.0.5/lib/crypto/c_src/crypto.c ./lib/crypto/c_src/crypto.c
--- ../otp-OTP-21.0.5/lib/crypto/c_src/crypto.c 2018-08-10 17:02:51.000000000 +0000
+++ ./lib/crypto/c_src/crypto.c 2018-08-23 22:08:35.654582842 +0000
@@ -193,7 +193,8 @@
#endif
#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') \
- && defined(HAVE_EC)
+ && defined(HAVE_EC) \
+ && !defined(OPENSSL_NO_ENGINE)
/* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
So if EC is disabled, you can't use Engine either....
*/

View File

@ -0,0 +1,13 @@
diff -u -r ../otp-OTP-21.0.5/lib/crypto/c_src/otp_test_engine.c ./lib/crypto/c_src/otp_test_engine.c
--- ../otp-OTP-21.0.5/lib/crypto/c_src/otp_test_engine.c 2018-08-10 17:02:51.000000000 +0000
+++ ./lib/crypto/c_src/otp_test_engine.c 2018-08-23 22:15:50.757486039 +0000
@@ -41,7 +41,8 @@
#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \
&& !defined(OPENSSL_NO_EC) \
&& !defined(OPENSSL_NO_ECDH) \
- && !defined(OPENSSL_NO_ECDSA)
+ && !defined(OPENSSL_NO_ECDSA) \
+ && !defined(OPENSSL_NO_ENGINE)
# define HAVE_EC
#endif

View File

@ -0,0 +1,13 @@
diff -u -r ../httping-2.5/mssl.c ./mssl.c
--- ../httping-2.5/mssl.c 2016-09-12 07:45:50.000000000 +0000
+++ ./mssl.c 2018-08-23 19:38:43.467717597 +0000
@@ -35,7 +35,9 @@
ERR_free_strings();
ERR_remove_state(0);
+#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
+#endif
CONF_modules_free();
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();

View File

@ -0,0 +1,12 @@
diff -u -r ../ldns-1.7.0/keys.c ./keys.c
--- ../ldns-1.7.0/keys.c 2016-12-20 10:48:22.000000000 +0000
+++ ./keys.c 2018-08-23 17:05:00.759800098 +0000
@@ -107,7 +107,7 @@
k = ldns_key_new();
if(!k) return LDNS_STATUS_MEM_ERR;
-#ifndef S_SPLINT_S
+#if !defined(S_SPLINT_S) && !defined(OPENSSL_NO_ENGINE)
k->_key.key = ENGINE_load_private_key(e, key_id, UI_OpenSSL(), NULL);
if(!k->_key.key) {
ldns_key_free(k);

View File

@ -0,0 +1,14 @@
diff -u -r ../mosquitto-1.5.1/lib/net_mosq.c ./lib/net_mosq.c
--- ../mosquitto-1.5.1/lib/net_mosq.c 2018-08-16 16:05:26.000000000 +0000
+++ ./lib/net_mosq.c 2018-08-23 17:45:34.544680239 +0000
@@ -103,7 +103,9 @@
#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_remove_state(0);
#endif
- ENGINE_cleanup();
+ #ifndef OPENSSL_NO_ENGINE
+ ENGINE_cleanup();
+ #endif
CONF_modules_unload(1);
ERR_free_strings();
EVP_cleanup();

View File

@ -0,0 +1,13 @@
diff -u -r ../tor-0.3.3.9/src/common/crypto_openssl_mgt.h ./src/common/crypto_openssl_mgt.h
--- ../tor-0.3.3.9/src/common/crypto_openssl_mgt.h 2018-07-13 18:25:23.000000000 +0000
+++ ./src/common/crypto_openssl_mgt.h 2018-08-23 22:30:55.658879513 +0000
@@ -50,8 +50,7 @@
#define OPENSSL_V_SERIES(a,b,c) \
OPENSSL_VER((a),(b),(c),0,0)
-#ifdef ANDROID
-/* Android's OpenSSL seems to have removed all of its Engine support. */
+#ifdef OPENSSL_NO_ENGINE
#define DISABLE_ENGINES
#endif

View File

@ -0,0 +1,13 @@
diff -u -r ../wget-1.19.5/src/openssl.c ./src/openssl.c
--- ../wget-1.19.5/src/openssl.c 2018-05-05 20:49:06.000000000 +0000
+++ ./src/openssl.c 2018-08-23 22:35:58.863327970 +0000
@@ -193,7 +193,9 @@
#if OPENSSL_VERSION_NUMBER >= 0x00907000
OPENSSL_load_builtin_modules();
+# ifndef OPENSSL_NO_ENGINE
ENGINE_load_builtin_engines();
+# endif
CONF_modules_load_file(NULL, NULL,
CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE);
#endif