From: Richard Levitte Date: Mon, 11 Aug 2025 18:57:44 +0000 (+0200) Subject: Correct the synthetisized OPENSSL_VERSION_NUMBER X-Git-Tag: openssl-3.6.0-alpha1~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba2c314a60d9f42d1d2e63ea0f791cc04e03005b;p=thirdparty%2Fopenssl.git Correct the synthetisized OPENSSL_VERSION_NUMBER The last hex digit always became 0x0L, even of OPENSSL_VERSION_PRE_RELEASE was the empty string. Resolves: https://github.com/openssl/openssl/issues/28227 Reviewed-by: Paul Yang Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/28230) --- diff --git a/include/openssl/opensslv.h.in b/include/openssl/opensslv.h.in index 3f47a2ac08f..d15cce412f5 100644 --- a/include/openssl/opensslv.h.in +++ b/include/openssl/opensslv.h.in @@ -90,16 +90,11 @@ extern "C" { # define OPENSSL_VERSION_TEXT "OpenSSL {- "$config{full_version} $config{release_date}" -}" /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ -# ifdef OPENSSL_VERSION_PRE_RELEASE -# define _OPENSSL_VERSION_PRE_RELEASE 0x0L -# else -# define _OPENSSL_VERSION_PRE_RELEASE 0xfL -# endif # define OPENSSL_VERSION_NUMBER \ ( (OPENSSL_VERSION_MAJOR<<28) \ |(OPENSSL_VERSION_MINOR<<20) \ |(OPENSSL_VERSION_PATCH<<4) \ - |_OPENSSL_VERSION_PRE_RELEASE ) + |{- @config{prerelease} ? "0x0L" : "0xfL" -} ) # ifdef __cplusplus }