Move the version function declarations to include/openssl/crypto.h
authorRichard Levitte <levitte@openssl.org>
Thu, 17 Oct 2019 16:15:13 +0000 (18:15 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 18 Oct 2019 10:22:00 +0000 (12:22 +0200)
include/openssl/crypto.h is where older similar functions already
live, and since opensslv.h became a template, it's no longer useful
for parsing by util/mknum.pl.

Affected declarations:

 unsigned int OPENSSL_version_major(void);
 unsigned int OPENSSL_version_minor(void);
 unsigned int OPENSSL_version_patch(void);
 const char *OPENSSL_version_pre_release(void);
 const char *OPENSSL_version_build_metadata(void);

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10205)

doc/man3/OpenSSL_version.pod
include/openssl/crypto.h
include/openssl/opensslv.h.in

index 18eaf4a9e9b8647a8bb1c71f3339aa6466d57826..7e9c36eb76d44606ff737cef82f814d44a1766e7 100644 (file)
@@ -27,14 +27,14 @@ OPENSSL_VERSION_NUMBER, OpenSSL_version_num, OPENSSL_info
 
  #define OPENSSL_VERSION_TEXT "OpenSSL x.y.z xx XXX xxxx"
 
+ #include <openssl/crypto.h>
+
  unsigned int OPENSSL_version_major(void);
  unsigned int OPENSSL_version_minor(void);
  unsigned int OPENSSL_version_patch(void);
  const char *OPENSSL_version_pre_release(void);
  const char *OPENSSL_version_build_metadata(void);
 
- #include <openssl/crypto.h>
-
  const char *OpenSSL_version(int t);
 
  const char *OPENSSL_info(int t);
index 9fb2fa39257d6404a4c544f1dd13de5c478ded6d..7a74f3d4eb8a97e7d1e9c4260ce36e43317ff3bf 100644 (file)
@@ -164,6 +164,17 @@ int OPENSSL_hexchar2int(unsigned char c);
 
 # define OPENSSL_MALLOC_MAX_NELEMS(type)  (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
 
+/*
+ * These functions return the values of OPENSSL_VERSION_MAJOR,
+ * OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE
+ * and OPENSSL_VERSION_BUILD_METADATA, respectively.
+ */
+unsigned int OPENSSL_version_major(void);
+unsigned int OPENSSL_version_minor(void);
+unsigned int OPENSSL_version_patch(void);
+const char *OPENSSL_version_pre_release(void);
+const char *OPENSSL_version_build_metadata(void);
+
 unsigned long OpenSSL_version_num(void);
 const char *OpenSSL_version(int type);
 # define OPENSSL_VERSION                0
index 856e8640b8accb95513af683ea939ff172992d75..69ba8c657aeb000d80d68e070e218fd57733b260 100644 (file)
@@ -102,17 +102,6 @@ _____
 # define OPENSSL_VERSION_PREREQ(maj,min)                                \
     ((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min))
 
-/*
- * These return the values of OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR,
- * OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE and
- * OPENSSL_VERSION_BUILD_METADATA, respectively.
- */
-unsigned int OPENSSL_version_major(void);
-unsigned int OPENSSL_version_minor(void);
-unsigned int OPENSSL_version_patch(void);
-const char *OPENSSL_version_pre_release(void);
-const char *OPENSSL_version_build_metadata(void);
-
 /*
  * Macros to get the version in easily digested string form, both the short
  * "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced