aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-09-01 19:06:54 -0700
committerJohn Crispin <john@phrozen.org>2018-09-10 09:01:37 +0200
commitf78e07ad2a0926739310f8a6fd74a7b162123c98 (patch)
tree7dc863d385c6fa42baa5b6bbe9885c1533c8efd7 /package/network/services/hostapd
parent192838e018d526a51ff8908aebaf9ce07e210dca (diff)
downloadupstream-f78e07ad2a0926739310f8a6fd74a7b162123c98.tar.gz
upstream-f78e07ad2a0926739310f8a6fd74a7b162123c98.tar.bz2
upstream-f78e07ad2a0926739310f8a6fd74a7b162123c98.zip
hostapd: Fix compile with OpenSSL 1.1.0 + no deprecated APIs
Patch was accepted upsteam: https://w1.fi/cgit/hostap/commit/?id=373c796948599a509bad71695b5b72eef003f661 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/network/services/hostapd')
-rw-r--r--package/network/services/hostapd/patches/700-fix-openssl11.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/700-fix-openssl11.patch b/package/network/services/hostapd/patches/700-fix-openssl11.patch
new file mode 100644
index 0000000000..918cab0899
--- /dev/null
+++ b/package/network/services/hostapd/patches/700-fix-openssl11.patch
@@ -0,0 +1,40 @@
+From 672540d4ddbd24782b5c65b35d636bdfe8a90d0f Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 15 Jun 2018 18:35:30 -0700
+Subject: [PATCH] Fix compile with OpenSSL 1.1.0 and deprecated APIs
+
+SSL_session_reused is the same as SSL_cache_hit. The engine load stuff is
+now handled by OPENSSL_init.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ 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 b4bfc9b73..79ac909d0 100644
+--- a/src/crypto/tls_openssl.c
++++ b/src/crypto/tls_openssl.c
+@@ -1024,8 +1024,10 @@ void * tls_init(const struct tls_config *conf)
+
+ #ifndef OPENSSL_NO_ENGINE
+ wpa_printf(MSG_DEBUG, "ENGINE: Loading dynamic engine");
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_load_ENGINE_strings();
+ ENGINE_load_dynamic();
++#endif /* OPENSSL_VERSION_NUMBER */
+
+ if (conf &&
+ (conf->opensc_engine_path || conf->pkcs11_engine_path ||
+@@ -3874,7 +3876,7 @@ struct wpabuf * tls_connection_decrypt(void *tls_ctx,
+
+ int tls_connection_resumed(void *ssl_ctx, struct tls_connection *conn)
+ {
+- return conn ? SSL_cache_hit(conn->ssl) : 0;
++ return conn ? SSL_session_reused(conn->ssl) : 0;
+ }
+
+
+--
+2.17.1
+