[Git][NTPsec/ntpsec][master] Add ifdef protection around function calls deprecated in OpenSSL 1.1
Matt Selsky
gitlab at mg.gitlab.com
Tue Jan 31 14:43:23 UTC 2017
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
7c535792 by Matt Selsky at 2017-01-31T09:42:29-05:00
Add ifdef protection around function calls deprecated in OpenSSL 1.1
- - - - -
3 changed files:
- devel/ifdex-ignores
- libntp/ssl_init.c
- wafhelpers/check_openssl.py
Changes:
=====================================
devel/ifdex-ignores
=====================================
--- a/devel/ifdex-ignores
+++ b/devel/ifdex-ignores
@@ -56,6 +56,9 @@ PY_MAJOR_VERSION
MOD_TIMETICK
NTP_API
+# OpenSSL
+OPENSSL_VERSION_NUMBER
+
# Things WAF sets that don't get #undefs if they're not set
ENABLE_EARLY_DROPROOT
ENABLE_LEAP_SMEAR
=====================================
libntp/ssl_init.c
=====================================
--- a/libntp/ssl_init.c
+++ b/libntp/ssl_init.c
@@ -14,7 +14,9 @@
#include <openssl/evp.h>
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
void atexit_ssl_cleanup(void);
+#endif
static bool ssl_init_done;
@@ -26,13 +28,16 @@ ssl_init(void)
init_lib();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_digests();
atexit(&atexit_ssl_cleanup);
+#endif
ssl_init_done = true;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
void
atexit_ssl_cleanup(void)
{
@@ -42,3 +47,4 @@ atexit_ssl_cleanup(void)
ssl_init_done = false;
EVP_cleanup();
}
+#endif
=====================================
wafhelpers/check_openssl.py
=====================================
--- a/wafhelpers/check_openssl.py
+++ b/wafhelpers/check_openssl.py
@@ -5,7 +5,9 @@ int main(void) {
#if OPENSSL_VERSION_NUMBER < 0x0090704fL
#error OpenSSL is too old.
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_digests();
+#endif
return 0;
}
"""
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7c535792b704775ac5d2d9ca50e67bef7d4d297a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170131/8275f38c/attachment.html>
More information about the vc
mailing list