[Git][NTPsec/ntpsec][master] Print OpenSSL version when configuring.
Hal Murray (@hal.murray)
gitlab at mg.gitlab.com
Thu Apr 13 08:29:37 UTC 2023
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
98e316aa by James Browning at 2023-04-09T22:50:01-07:00
Print OpenSSL version when configuring.
- - - - -
3 changed files:
- NEWS.adoc
- wafhelpers/openssl.py
- wscript
Changes:
=====================================
NEWS.adoc
=====================================
@@ -12,6 +12,8 @@ on user-visible changes.
## Repository Head
+* Print out OpenSSL version at configure time.
+
* Enable debug symbols by default, with only an option to disable.
* Add support for ecdhcurves list.
=====================================
wafhelpers/openssl.py
=====================================
@@ -38,3 +38,27 @@ def check_openssl_bad_version(ctx):
use="SSL CRYPTO",
msg="Checking for OpenSSL != 1.1.1a",
)
+
+
+SNIP_OPENSSL_DUMP_VERSION = """
+#include <stdio.h>
+#include <openssl/opensslv.h>
+
+int main(void) {
+ printf("%s\\n", OPENSSL_VERSION_TEXT);
+ return 0;
+}
+"""
+
+
+def dump_openssl_version(ctx):
+ _ = "XXX_LIBSSL_VERSION"
+ ctx.start_msg("OpenSSL version")
+ ctx.check_cc(
+ fragment=SNIP_OPENSSL_DUMP_VERSION,
+ execute=True,
+ define_ret=True,
+ define_name=_,
+ )
+ ctx.end_msg(ctx.get_define(_).split()[1])
+ ctx.undefine(_)
=====================================
wscript
=====================================
@@ -882,8 +882,10 @@ int main(int argc, char **argv) {
if not ctx.env.DISABLE_NTS:
from wafhelpers.openssl import check_libssl_tls13
from wafhelpers.openssl import check_openssl_bad_version
+ from wafhelpers.openssl import dump_openssl_version
check_libssl_tls13(ctx)
check_openssl_bad_version(ctx)
+ dump_openssl_version(ctx)
# before write_config()
if ctx.is_defined("HAVE_LINUX_CAPABILITY"):
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/98e316aa2e72d41ad450ebc33d59710fb1894e63
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/98e316aa2e72d41ad450ebc33d59710fb1894e63
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20230413/3afaa367/attachment-0001.htm>
More information about the vc
mailing list