The variable is currently not used, but it will be useful later for key
generation and daemon startup based on actually selected host key types.

Signed-off-by: Alexander Dahl <[email protected]>
---

Notes:
    v2 -> v3
    --------
    - adapted to DSS key support removal

 projectroot/etc/init.d/dropbear      | 2 --
 projectroot/usr/lib/init/dropbear.sh | 1 +
 rules/dropbear.make                  | 9 +++++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear
index b394eab15..15671c9d8 100644
--- a/projectroot/etc/init.d/dropbear
+++ b/projectroot/etc/init.d/dropbear
@@ -13,8 +13,6 @@ DROPBEAR_EXTRA_ARGS=
 
 test -z "$DROPBEAR_BANNER" || \
   DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
-test -n "$DROPBEAR_KEYTYPES" || \
-  DROPBEAR_KEYTYPES="rsa"
 
 dropbear_start() {
 
diff --git a/projectroot/usr/lib/init/dropbear.sh 
b/projectroot/usr/lib/init/dropbear.sh
index 7b94429b4..f4a083b8c 100644
--- a/projectroot/usr/lib/init/dropbear.sh
+++ b/projectroot/usr/lib/init/dropbear.sh
@@ -1,3 +1,4 @@
 #!/bin/sh
 
 DROPBEAR_RSAKEY='@KEYDIR@/dropbear_rsa_host_key'
+DROPBEAR_KEYTYPES='@KEYTYPES@'
diff --git a/rules/dropbear.make b/rules/dropbear.make
index bdf855fe3..102825ed6 100644
--- a/rules/dropbear.make
+++ b/rules/dropbear.make
@@ -264,6 +264,13 @@ DROPBEAR_INSTALL_OPT       := install inst_scp
 # Target-Install
 # ----------------------------------------------------------------------------
 
+ifdef PTXCONF_DROPBEAR_RSA
+DROPBEAR_KEY_TYPES     += rsa
+endif
+ifdef PTXCONF_DROPBEAR_ECDSA
+DROPBEAR_KEY_TYPES     += ecdsa
+endif
+
 $(STATEDIR)/dropbear.targetinstall:
        @$(call targetinfo)
 
@@ -276,6 +283,8 @@ $(STATEDIR)/dropbear.targetinstall:
        @$(call install_alternative, dropbear, 0, 0, 0644, 
/usr/lib/init/dropbear.sh)
        @$(call install_replace, dropbear, /usr/lib/init/dropbear.sh, \
                @KEYDIR@, $(PTXCONF_DROPBEAR_KEY_DIR))
+       @$(call install_replace, dropbear, /usr/lib/init/dropbear.sh, \
+               @KEYTYPES@, '$(DROPBEAR_KEY_TYPES)')
 
 ifdef PTXCONF_DROPBEAR_DROPBEAR
        @$(call install_copy, dropbear, 0, 0, 0755, -, \
-- 
2.30.2


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

Reply via email to