summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-02-17 17:22:35 +0000
committerMatt Caswell <matt@openssl.org>2021-02-22 12:15:34 +0000
commit18b207c798b1ce1a760015d17150130269fa3110 (patch)
tree3126775a7fae8b4cd91809e5d8b4c5317703756d
parent7e1d7fea395654fd169bdb3d01b2f56236ed13c1 (diff)
Add documentation for the macro OPENSSL_VERSION_PREREQ
This macro was added since 1.1.1 but had no associated documentation. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14232)
-rw-r--r--doc/man3/OpenSSL_version.pod16
-rw-r--r--util/missingmacro.txt1
-rw-r--r--util/other.syms1
3 files changed, 13 insertions, 5 deletions
diff --git a/doc/man3/OpenSSL_version.pod b/doc/man3/OpenSSL_version.pod
index a4ef1cfbaf..e28a35e73a 100644
--- a/doc/man3/OpenSSL_version.pod
+++ b/doc/man3/OpenSSL_version.pod
@@ -4,10 +4,10 @@
OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH,
OPENSSL_VERSION_PRE_RELEASE, OPENSSL_VERSION_BUILD_METADATA,
-OPENSSL_VERSION_TEXT,
-OPENSSL_version_major, OPENSSL_version_minor, OPENSSL_version_patch,
-OPENSSL_version_pre_release, OPENSSL_version_build_metadata, OpenSSL_version,
-OPENSSL_VERSION_NUMBER, OpenSSL_version_num, OPENSSL_info
+OPENSSL_VERSION_TEXT, OPENSSL_VERSION_PREREQ, OPENSSL_version_major,
+OPENSSL_version_minor, OPENSSL_version_patch, OPENSSL_version_pre_release,
+OPENSSL_version_build_metadata, OpenSSL_version, OPENSSL_VERSION_NUMBER,
+OpenSSL_version_num, OPENSSL_info
- get OpenSSL version number and other information
=head1 SYNOPSIS
@@ -24,6 +24,8 @@ OPENSSL_VERSION_NUMBER, OpenSSL_version_num, OPENSSL_info
#define OPENSSL_VERSION_TEXT "OpenSSL x.y.z xx XXX xxxx"
+ #define OPENSSL_VERSION_PREREQ(maj,min)
+
#include <openssl/crypto.h>
unsigned int OPENSSL_version_major(void);
@@ -73,6 +75,12 @@ B<OPENSSL_VERSION_TEXT> is a convenience macro to get a full descriptive
version text, which includes B<OPENSSL_FULL_VERSION_STR> and the release
date.
+B<OPENSSL_VERSION_PREREQ> is a useful macro for checking whether the OpenSSL
+version for the headers in use is at least at the given pre-requisite major
+(B<maj>) and minor (B<min>) number or not. It will evaluate to true if the
+header version number (B<OPENSSL_VERSION_MAJOR>.B<OPENSSL_VERSION_MINOR>) is
+greater than or equal to B<maj>.B<min>.
+
=head2 Functions
OPENSSL_version_major(), OPENSSL_version_minor(), OPENSSL_version_patch(),
diff --git a/util/missingmacro.txt b/util/missingmacro.txt
index 4cad414f3a..7bdb96c0d4 100644
--- a/util/missingmacro.txt
+++ b/util/missingmacro.txt
@@ -99,7 +99,6 @@ PEM_write_bio_OCSP_REQUEST(3)
PEM_write_bio_OCSP_RESPONSE(3)
ASN1_BIT_STRING_digest(3)
OCSP_CERTSTATUS_dup(3)
-OPENSSL_VERSION_PREREQ(3)
OSSL_PARAM_DEFN(3)
OSSL_PARAM_SIZED_int(3)
OSSL_PARAM_SIZED_uint(3)
diff --git a/util/other.syms b/util/other.syms
index 670ba78938..3d84ea7772 100644
--- a/util/other.syms
+++ b/util/other.syms
@@ -348,6 +348,7 @@ OPENSSL_VERSION_MINOR define
OPENSSL_VERSION_NUMBER define deprecated 3.0.0
OPENSSL_VERSION_PATCH define
OPENSSL_VERSION_PRE_RELEASE define
+OPENSSL_VERSION_PREREQ define
OPENSSL_VERSION_BUILD_METADATA define
OPENSSL_VERSION_PRE_RELEASE_STR define
OPENSSL_VERSION_BUILD_METADATA_STR define