From 042ddd33b478de59434d6b496a011588b38d7d34 Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 28 Jul 2021 20:52:01 +0000 Subject: [PATCH] Get runtime version of OpenSSL, not header version. --- nmap.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nmap.cc b/nmap.cc index 43a00a445..e9d9957ed 100644 --- a/nmap.cc +++ b/nmap.cc @@ -111,6 +111,7 @@ #if HAVE_OPENSSL #include +#include #endif #if HAVE_LIBSSH2 @@ -2734,7 +2735,11 @@ static void display_nmap_version() { #endif #if HAVE_OPENSSL - with.push_back(std::string("openssl-") + get_word_or_quote(OPENSSL_VERSION_TEXT, 1)); +#ifdef SSLEAY_VERSION + with.push_back(std::string("openssl-") + get_word_or_quote(SSLeay_version(SSLEAY_VERSION), 1)); +#else + with.push_back(std::string("openssl-") + get_word_or_quote(OpenSSL_version(OPENSSL_VERSION), 1)); +#endif #else without.push_back("openssl"); #endif