aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-07-28 02:31:09 (GMT)
committerJouni Malinen <j@w1.fi>2018-08-12 13:26:31 (GMT)
commit373c796948599a509bad71695b5b72eef003f661 (patch)
treed01aef231ebc17281d149cb78b64c1546fa9a37c
parentc6e1a9a0b3d6962253c8ceb78cbc05ced820241e (diff)
downloadhostap-373c796948599a509bad71695b5b72eef003f661.zip
hostap-373c796948599a509bad71695b5b72eef003f661.tar.gz
hostap-373c796948599a509bad71695b5b72eef003f661.tar.bz2
OpenSSL: Fix compile with OpenSSL 1.1.0 and deprecated APIs
SSL_session_reused() is the same as the deprecated SSL_cache_hit(). The engine load stuff is now handled by OPENSSL_init(). Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--src/crypto/tls_openssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index b4bfc9b..79ac909 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;
}