summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <stefan.strogin@gmail.com>2019-01-13 21:24:24 +0200
committerRick Farina <zerochaos@gentoo.org>2019-01-13 20:42:16 -0500
commitad158c5c451d3fe5878fba086e38e064654c1087 (patch)
treeb1b0fbf8574aaddbb4657b4fff5cb5e87ba4c7dc /net-wireless/wpa_supplicant/files
parentapp-editors/wily: EAPI=7 (diff)
downloadgentoo-ad158c5c451d3fe5878fba086e38e064654c1087.tar.gz
gentoo-ad158c5c451d3fe5878fba086e38e064654c1087.tar.bz2
gentoo-ad158c5c451d3fe5878fba086e38e064654c1087.zip
net-wireless/wpa_supplicant: add LibreSSL fix from upstream
Close: https://bugs.gentoo.org/672632 Package-Manager: Portage-2.3.55, Repoman-2.3.12 Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com> Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/wpa_supplicant/files')
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch
new file mode 100644
index 000000000000..45a1cf3701f9
--- /dev/null
+++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch
@@ -0,0 +1,46 @@
+From 2643a056bb7d0737f63f42a11c308b2804d9ebe5 Mon Sep 17 00:00:00 2001
+From: Andrey Utkin <andrey_utkin@gentoo.org>
+Date: Tue, 11 Dec 2018 17:41:10 +0000
+Subject: [PATCH] Fix build with LibreSSL
+
+When using LibreSSL instead of OpenSSL, linkage of hostapd executable
+fails with the following error when using some LibreSSL versions
+
+ ../src/crypto/tls_openssl.o: In function `tls_verify_cb':
+ tls_openssl.c:(.text+0x1273): undefined reference to `ASN1_STRING_get0_data'
+ ../src/crypto/tls_openssl.o: In function `tls_connection_peer_serial_num':
+ tls_openssl.c:(.text+0x3023): undefined reference to `ASN1_STRING_get0_data'
+ collect2: error: ld returned 1 exit status
+ make: *** [Makefile:1278: hostapd] Error 1
+
+ASN1_STRING_get0_data is present in recent OpenSSL, but absent in some
+versions of LibreSSL (confirmed for version 2.6.5), so fallback needs to
+be defined in this case, just like for old OpenSSL.
+
+This patch was inspired by similar patches to other projects, such as
+spice-gtk, pjsip.
+
+Link: https://bugs.gentoo.org/672834
+Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>
+---
+ src/crypto/tls_openssl.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
+index 608818310..cb70e2c47 100644
+--- a/src/crypto/tls_openssl.c
++++ b/src/crypto/tls_openssl.c
+@@ -104,7 +104,9 @@ static size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
+
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && \
++ LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #ifdef CONFIG_SUITEB
+ static int RSA_bits(const RSA *r)
+ {
+--
+2.20.1
+