diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2018-12-09 17:10:29 -0500 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-05 21:48:41 +0200 |
commit | 7e8c3381937354cf171ceaf4c69315e9a45d4858 (patch) | |
tree | f4af4acda1306a98499d21c8acf6b7b82556eaff /include | |
parent | 464ac47f81c07d5630026d3ce1251da00c469e00 (diff) |
Undeprecate OpenSSL_version_num and OPENSSL_VERSION_NUMBER
The OpenSSL_version_num() function returns at runtime the
OPENSSL_VERSION_NUMBER of the compiled OpenSSL library. This is a
used and useful interface, and should not (at least yet) be
deprecated, we just introduced the new versioning schema, it seems
too early to deprecate the old.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7853)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/crypto.h | 2 | ||||
-rw-r--r-- | include/openssl/opensslv.h | 22 |
2 files changed, 10 insertions, 14 deletions
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 05580ad93c..da62eef1b1 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -158,7 +158,7 @@ int OPENSSL_hexchar2int(unsigned char c); # define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type)) -DEPRECATEDIN_3(unsigned long OpenSSL_version_num(void)) +unsigned long OpenSSL_version_num(void); const char *OpenSSL_version(int type); # define OPENSSL_VERSION 0 # define OPENSSL_CFLAGS 1 diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index c1d4b6f9b6..6a62b495b2 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -121,21 +121,17 @@ const char *OPENSSL_version_build_metadata(void); /* * SECTION 4: BACKWARD COMPATIBILITY */ -# include <openssl/macros.h> - -# if !OPENSSL_API_4 /* 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 ) +# ifdef OPENSSL_VERSION_PRE_RELEASE +# define _OPENSSL_VERSION_PRE_RELEASE 0x0 +# else +# define _OPENSSL_VERSION_PRE_RELEASE 0xf # endif +# define OPENSSL_VERSION_NUMBER \ + ( (OPENSSL_VERSION_MAJOR<<28) \ + |(OPENSSL_VERSION_MINOR<<20) \ + |(OPENSSL_VERSION_PATCH<<4) \ + |_OPENSSL_VERSION_PRE_RELEASE ) # ifdef __cplusplus } |