From b34c623c074c8eb315667320b041b4744754795f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 3 Dec 2015 23:53:35 +0200 Subject: [PATCH] OpenSSL: Fix build with current OpenSSL master branch snapshot OpenSSL 1.1.x will apparently go out with "SSLeay" renamed in the API to "OpenSSL", which broke the build here for fetching the version of the running OpenSSL library when wpa_supplicant/hostapd is built against the current OpenSSL snapshot. Signed-off-by: Jouni Malinen --- src/crypto/tls_openssl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 388346566..030e1e2fb 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -5012,9 +5012,15 @@ int tls_connection_set_session_ticket_cb(void *tls_ctx, int tls_get_library_version(char *buf, size_t buf_len) { +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s", + OPENSSL_VERSION_TEXT, + OpenSSL_version(OPENSSL_VERSION)); +#else return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); +#endif }