aboutsummaryrefslogtreecommitdiffstats
path: root/main/curl
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-25 20:12:35 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-25 20:14:56 +0200
commit11e11bb46a75faa10dea43b008301429904f65fb (patch)
tree8da56204ed8d623d3e31f0829d04d17bd5cbe71c /main/curl
parent8316fbc25979b56ad2d85a05feea815f66d5e128 (diff)
downloadaports-11e11bb46a75faa10dea43b008301429904f65fb.tar.bz2
aports-11e11bb46a75faa10dea43b008301429904f65fb.tar.xz
main/curl: fix crashes due to LibreSSL/OpenSSL engines conflicts
Diffstat (limited to 'main/curl')
-rw-r--r--main/curl/APKBUILD6
-rw-r--r--main/curl/use-OPENSSL_config.patch41
2 files changed, 45 insertions, 2 deletions
diff --git a/main/curl/APKBUILD b/main/curl/APKBUILD
index c597be1164..21c04f6761 100644
--- a/main/curl/APKBUILD
+++ b/main/curl/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=curl
pkgver=7.60.0
-pkgrel=0
+pkgrel=1
pkgdesc="URL retrival utility and library"
url="https://curl.haxx.se"
arch="all"
@@ -16,6 +16,7 @@ makedepends="$depends_dev autoconf automake groff libtool perl"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev libcurl"
source="https://curl.haxx.se/download/$pkgname-$pkgver.tar.xz
0001-openssl-fix-build-with-libressl-2.7.patch
+ use-OPENSSL_config.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -105,4 +106,5 @@ libcurl() {
}
sha512sums="96a0c32ca846a76bba75e9e560ad4c15df79540992ed1a83713095be94ddba039f289bda9678762fd79fb9691fe810735178fb9dc970c37012dff96b8ce08abf curl-7.60.0.tar.xz
-16c9b54cfa996a61278c0a899840be9e42477661ff6d69d6a772671aeb50a597e9de9328ba3c0a5cb71fa073e4a58db5f3962aab7636a9f1327cad343ff05ae9 0001-openssl-fix-build-with-libressl-2.7.patch"
+16c9b54cfa996a61278c0a899840be9e42477661ff6d69d6a772671aeb50a597e9de9328ba3c0a5cb71fa073e4a58db5f3962aab7636a9f1327cad343ff05ae9 0001-openssl-fix-build-with-libressl-2.7.patch
+708527e73f9512c50e2250ca26786ba8994dc05fd2e362c1feb274e251219fb4bfc97e7e7722aa12424ccaf4c511d90d8820561c82a24f103b9ee2b743f4be28 use-OPENSSL_config.patch"
diff --git a/main/curl/use-OPENSSL_config.patch b/main/curl/use-OPENSSL_config.patch
new file mode 100644
index 0000000000..925a90349f
--- /dev/null
+++ b/main/curl/use-OPENSSL_config.patch
@@ -0,0 +1,41 @@
+Fix symbol conflict with OpenSSL 1.0 / LibreSSL.
+
+This basically reverts https://github.com/curl/curl/commit/7d2f61f66ab4e047fc9aefc2effc1ac6d340a66a
+
+Issue: https://bugs.alpinelinux.org/issues/8923
+Patch-Source: https://build.opensuse.org/package/view_file/devel:libraries:c_c++/curl/curl-use_OPENSSL_config.patch
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index 80e9bf940..ba227891f 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -935,26 +935,12 @@
+ ENGINE_load_builtin_engines();
+ #endif
+
+- /* OPENSSL_config(NULL); is "strongly recommended" to use but unfortunately
+- that function makes an exit() call on wrongly formatted config files
+- which makes it hard to use in some situations. OPENSSL_config() itself
+- calls CONF_modules_load_file() and we use that instead and we ignore
+- its return code! */
+-
+- /* CONF_MFLAGS_DEFAULT_SECTION introduced some time between 0.9.8b and
+- 0.9.8e */
+-#ifndef CONF_MFLAGS_DEFAULT_SECTION
+-#define CONF_MFLAGS_DEFAULT_SECTION 0x0
+-#endif
+-
+- CONF_modules_load_file(NULL, NULL,
+- CONF_MFLAGS_DEFAULT_SECTION|
+- CONF_MFLAGS_IGNORE_MISSING_FILE);
+-
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
+ !defined(LIBRESSL_VERSION_NUMBER)
+- /* OpenSSL 1.1.0+ takes care of initialization itself */
++ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
+ #else
++ OPENSSL_config(NULL);
++
+ /* Lets get nice error messages */
+ SSL_load_error_strings();
+