Commit 451ac693 authored by Jakub Jirutka's avatar Jakub Jirutka

main/curl: fix crashes due to LibreSSL/OpenSSL engines conflicts

parent 78ce279c
......@@ -4,7 +4,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=curl
pkgver=7.60.0
pkgrel=0
pkgrel=1
pkgdesc="An URL retrival utility and library"
url="http://curl.haxx.se"
arch="all"
......@@ -13,6 +13,9 @@ depends="ca-certificates"
makedepends="zlib-dev libressl-dev libssh2-dev groff perl"
source="http://curl.haxx.se/download/$pkgname-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev libcurl"
source="https://curl.haxx.se/download/$pkgname-$pkgver.tar.xz
use-OPENSSL_config.patch
"
builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
......@@ -99,4 +102,5 @@ libcurl() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}
sha512sums="96a0c32ca846a76bba75e9e560ad4c15df79540992ed1a83713095be94ddba039f289bda9678762fd79fb9691fe810735178fb9dc970c37012dff96b8ce08abf curl-7.60.0.tar.xz"
sha512sums="96a0c32ca846a76bba75e9e560ad4c15df79540992ed1a83713095be94ddba039f289bda9678762fd79fb9691fe810735178fb9dc970c37012dff96b8ce08abf curl-7.60.0.tar.xz
708527e73f9512c50e2250ca26786ba8994dc05fd2e362c1feb274e251219fb4bfc97e7e7722aa12424ccaf4c511d90d8820561c82a24f103b9ee2b743f4be28 use-OPENSSL_config.patch"
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();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment