[Git][NTPsec/ntpsec][master] We need libcrypto from OpenSSL, but not libssl.

Matt Selsky gitlab at mg.gitlab.com
Sat Jan 28 17:17:30 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
eacc23c1 by Matt Selsky at 2017-01-28T10:14:15-05:00
We need libcrypto from OpenSSL, but not libssl.

Skip checks for libssl and don't link it in

- - - - -


4 changed files:

- libntp/wscript
- ntpd/wscript
- wafhelpers/check_openssl.py
- wafhelpers/configure.py


Changes:

=====================================
libntp/wscript
=====================================
--- a/libntp/wscript
+++ b/libntp/wscript
@@ -65,6 +65,6 @@ def build(ctx):
 		features	= "c cshlib bld_include src_include pyext",
 		source		= ["pymodule.c"] + libntp_source_sharable,
 		install_path	= '${PYTHONDIR}/ntp',
-		use		= "M RT SSL CRYPTO",
+		use		= "M RT CRYPTO",
 		includes	= includes,
 	)


=====================================
ntpd/wscript
=====================================
--- a/ntpd/wscript
+++ b/ntpd/wscript
@@ -132,7 +132,7 @@ def build(ctx):
 		target		= "ntpd",
 		features	= "c rtems_trace cprogram bld_include src_include libisc_include libisc_pthread_include",
 		source		= ntpd_source,
-		use		= "libntpd_obj isc ntp M parse RT CAP SECCOMP PTHREAD SSL CRYPTO DNS_SD DNS_SD_INCLUDES %s SOCKET NSL SCF" % use_refclock,
+		use		= "libntpd_obj isc ntp M parse RT CAP SECCOMP PTHREAD CRYPTO DNS_SD DNS_SD_INCLUDES %s SOCKET NSL SCF" % use_refclock,
 		includes	= [
 					"%s/host/ntpd/" % ctx.bldnode.parent.abspath(),
 					"%s/ntpd/" % srcnode,


=====================================
wafhelpers/check_openssl.py
=====================================
--- a/wafhelpers/check_openssl.py
+++ b/wafhelpers/check_openssl.py
@@ -12,7 +12,7 @@ int main(void) {
 """
 
 
-def configure_ssl(ctx):
+def configure_openssl(ctx):
 
     OPENSSL_HEADERS = True
     OPENSSL_LIB = True
@@ -29,11 +29,8 @@ def configure_ssl(ctx):
                             comment="<%s> header" % hdr):
             OPENSSL_HEADERS = False
 
-    libs = ["ssl", "crypto"]
-
-    for lib in libs:
-        if not ctx.check_cc(lib=lib, mandatory=False):
-            OPENSSL_LIB = False
+    if not ctx.check_cc(lib="crypto", mandatory=False):
+        OPENSSL_LIB = False
 
     if OPENSSL_HEADERS and OPENSSL_LIB:
         ctx.check_cc(
@@ -41,7 +38,7 @@ def configure_ssl(ctx):
                                                for x in headers]),
             execute=True,
             mandatory=False,
-            use="SSL CRYPTO",
+            use="CRYPTO",
             msg="Checking if OpenSSL works",
             comment="OpenSSL support"
         )


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -331,8 +331,8 @@ def cmd_configure(ctx, config):
     ctx.check_cc(lib="rt", mandatory=False, comment="realtime library")
 
     # Find OpenSSL. Must happen before function checks
-    from wafhelpers.check_openssl import configure_ssl
-    configure_ssl(ctx)
+    from wafhelpers.check_openssl import configure_openssl
+    configure_openssl(ctx)
 
     # Optional functions.  Do all function checks here, otherwise
     # we're likely to duplicate them.



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/eacc23c120af76ed554fcfd0ca7eafa15f36da55
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170128/d7ef91c1/attachment.html>


More information about the vc mailing list