Use nettle crypto lib for stronger time packet
authentication support.

Signed-off-by: Bruno Thomsen <[email protected]>
---
Changes since version 1:
- Replace ptx/ifdef with ptx/endis and ptx/wwo for explicit options.
  This outputs unrecognized options, but we still get expected result.
  Unrecognized option :  --enable-sechash
  Unrecognized option :  --with-nettle

 rules/chrony.in   | 8 ++++++++
 rules/chrony.make | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/rules/chrony.in b/rules/chrony.in
index 1f5e241c9..c81eba868 100644
--- a/rules/chrony.in
+++ b/rules/chrony.in
@@ -6,6 +6,7 @@ menuconfig CHRONY
        prompt "chrony                        "
        select LIBC_M
        select LIBCAP
+       select NETTLE   if CHRONY_USE_NETTLE
        help
          This will install the Chrony NTPD Daemon (chronyd)
          Chrony is a pair of programs which are used to maintain
@@ -21,6 +22,13 @@ menuconfig CHRONY
 
 if CHRONY
 
+config CHRONY_USE_NETTLE
+       bool
+       prompt "Use nettle crypto library"
+       help
+         Use nettle crypto library for stronger keys than MD5 in
+         NTP authentication.
+
 comment "install options   ---"
 
 config CHRONY_INSTALL_CHRONY_COMMAND
diff --git a/rules/chrony.make b/rules/chrony.make
index 06fc7fd9a..c7571cfc8 100644
--- a/rules/chrony.make
+++ b/rules/chrony.make
@@ -39,8 +39,8 @@ CHRONY_CONF_OPT               := \
        $(CROSS_AUTOCONF_USR) \
        --disable-readline \
        --without-editline \
-       --disable-sechash \
-       --without-nettle \
+       --$(call ptx/endis, PTXCONF_CHRONY_USE_NETTLE)-sechash \
+       --$(call ptx/wwo, PTXCONF_CHRONY_USE_NETTLE)-nettle \
        --without-nss \
        --without-tomcrypt \
        --disable-cmdmon \
-- 
2.26.2


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to