]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Always use OpenSSL_version() to print OpenSSL version
authorOndřej Surý <ondrej@isc.org>
Tue, 6 Aug 2024 09:22:05 +0000 (11:22 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 6 Aug 2024 13:17:48 +0000 (15:17 +0200)
OpenSSL_version() first appeared in OpenSSL 1.1.0 and have been
available since LibreSSL 2.7.1 and OpenBSD 6.3, thus we can remove the
compatibility shims with older versions that are not supported anymore.

bin/named/main.c

index 50cbda8e8f780cca4852567936947e0cfa3b98cb..73f9060d9687f85904412e95d02ae6a1e1ba48d9 100644 (file)
@@ -1152,19 +1152,10 @@ setup(void) {
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "compiled with OpenSSL version: %s",
                      OPENSSL_VERSION_TEXT);
-#if !defined(LIBRESSL_VERSION_NUMBER) && \
-       OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "linked to OpenSSL version: %s",
                      OpenSSL_version(OPENSSL_VERSION));
-#else  /* if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= \
-       * 0x10100000L */
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to OpenSSL version: %s",
-                     SSLeay_version(SSLEAY_VERSION));
-#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "compiled with libuv version: %d.%d.%d", UV_VERSION_MAJOR,