diff options
author | Alexander Dahl <ada@thorsis.com> | 2021-11-05 16:47:32 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-11-12 10:12:15 +0100 |
commit | ea8fb9e68ff16f7537f89217201fbea63ef347c9 (patch) | |
tree | 07c89bc703bcc6fad9a028be3fe7e1881be21520 | |
parent | cf0424f8ba234645b8706edc2e9105eb7f421b2e (diff) | |
download | ptxdist-ea8fb9e68ff16f7537f89217201fbea63ef347c9.tar.gz ptxdist-ea8fb9e68ff16f7537f89217201fbea63ef347c9.tar.xz |
dropbear: Support ecdsa keys in rc-once and init
With 54afea33423c ("dropbear: Added Elliptic Curve Cryptography
options.") an option was added to built with ecdsa host key support, but
scripts where not adapted back then.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Message-Id: <20211105154734.19983-7-ada@thorsis.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | projectroot/etc/init.d/dropbear | 3 | ||||
-rw-r--r-- | projectroot/etc/rc.once.d/dropbear | 3 | ||||
-rw-r--r-- | projectroot/usr/lib/init/dropbear.sh | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear index 4dda9aaf7..2039340b2 100644 --- a/projectroot/etc/init.d/dropbear +++ b/projectroot/etc/init.d/dropbear @@ -22,6 +22,9 @@ dropbear_start() { rsa) test -f "$DROPBEAR_RSAKEY" && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY" ;; + ecdsa) + test -f "$DROPBEAR_ECDSAKEY" && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_ECDSAKEY" + ;; *) echo "Key type '$keytype' not supported" ;; diff --git a/projectroot/etc/rc.once.d/dropbear b/projectroot/etc/rc.once.d/dropbear index 0735fed38..b1c40fdbb 100644 --- a/projectroot/etc/rc.once.d/dropbear +++ b/projectroot/etc/rc.once.d/dropbear @@ -30,6 +30,9 @@ gen_keys() { rsa) gen_key rsa "$DROPBEAR_RSAKEY" ;; + ecdsa) + gen_key ecdsa "$DROPBEAR_ECDSAKEY" + ;; *) echo "Key type '$keytype' not supported" ;; diff --git a/projectroot/usr/lib/init/dropbear.sh b/projectroot/usr/lib/init/dropbear.sh index f4a083b8c..12fd6e5ce 100644 --- a/projectroot/usr/lib/init/dropbear.sh +++ b/projectroot/usr/lib/init/dropbear.sh @@ -1,4 +1,5 @@ #!/bin/sh DROPBEAR_RSAKEY='@KEYDIR@/dropbear_rsa_host_key' +DROPBEAR_ECDSAKEY='@KEYDIR@/dropbear_ecdsa_host_key' DROPBEAR_KEYTYPES='@KEYTYPES@' |