]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix compile with OpenSSL 1.1.0 and deprecated APIs
authorRosen Penev <rosenp@gmail.com>
Sat, 28 Jul 2018 02:31:09 +0000 (19:31 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 12 Aug 2018 13:26:31 +0000 (16:26 +0300)
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>
src/crypto/tls_openssl.c

index b4bfc9b7377bb421b48b0302ae647fe7d53aa703..79ac909d033f88dfb5c15d137cf67a7ca6cfec54 100644 (file)
@@ -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;
 }