diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
commit | 09351e78166b5e864197c4456ebae3f89dd0bed9 (patch) | |
tree | 41a96399f56ed3aa399006871bfce4430db84aa2 /net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch | |
parent | c8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff) |
gentoo resync : 22.01.2019
Diffstat (limited to 'net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch')
-rw-r--r-- | net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-libressl.patch | 46 |
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 + |