OpenNTPD looks for a crypto library with tls_config_set_ca_mem, which
is available in LibreSSL but not OpenSSL. If tls_config_set_ca_mem is
found, crypto support is added to the build.
Because this is not currently checked, crypto support might not be
added due to the order of the build. Add a small check to see if
BR2_PACKAGE_LIBRESSL is selected, and if so, add a dependency for it.
Also add a note about this in the Config.in help section.
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
to remote NTP servers and can act as NTP server itself,
redistributing the local clock. It just works.
+ Crypto support is available if the LibreSSL library is
+ enabled.
+
http://www.openntpd.org/
comment "openntpd needs a toolchain w/ NPTL"
# Need to autoreconf for our libtool patch to apply properly
OPENNTPD_AUTORECONF = YES
+# Openntpd searches for tls_config_set_ca_mem which is only available
+# in LibreSSL
+ifeq ($(BR2_PACKAGE_LIBRESSL),y)
+OPENNTPD_DEPENDENCIES += openssl
+endif
+
# openntpd uses pthread functions for arc4random emulation but forgets
# to use -pthread
OPENNTPD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -pthread"