Skip to content

Commit

Permalink
dropbear: enable ed25519 support added in 2020.79
Browse files Browse the repository at this point in the history
  • Loading branch information
er13 committed Oct 3, 2020
1 parent 8986d57 commit a15c402
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions make/dropbear/files/root/etc/init.d/rc.dropbear
Expand Up @@ -9,7 +9,7 @@ pre_config() {
mkdir -p /tmp/flash/dropbear

local alg do_save=false
for alg in rsa dss ecdsa; do
for alg in rsa dss ecdsa ed25519; do
local key_file=/tmp/flash/dropbear/${alg}_host_key
if [ ! -e "${key_file}" ]; then
do_save=true
Expand All @@ -22,7 +22,7 @@ pre_config() {

if [ ! -d "/mod/etc/ssh" ]; then
mkdir -p /mod/etc/ssh
for alg in rsa dss ecdsa; do
for alg in rsa dss ecdsa ed25519; do
ln -sf /tmp/flash/dropbear/${alg}_host_key /mod/etc/ssh/${alg}_host_key
done
fi
Expand Down
3 changes: 2 additions & 1 deletion make/dropbear/patches/110-freetz_defaults.patch
@@ -1,12 +1,13 @@
--- /dev/null
+++ localoptions.h
@@ -0,0 +1,12 @@
@@ -0,0 +1,13 @@
+#ifndef DROPBEAR_LOCALOPTIONS_H_
+#define DROPBEAR_LOCALOPTIONS_H_
+
+#define DSS_PRIV_FILENAME "/mod/etc/ssh/dss_host_key"
+#define RSA_PRIV_FILENAME "/mod/etc/ssh/rsa_host_key"
+#define ECDSA_PRIV_FILENAME "/mod/etc/ssh/ecdsa_host_key"
+#define ED25519_PRIV_FILENAME "/mod/etc/ssh/ed25519_host_key"
+
+#define SFTPSERVER_PATH "/usr/lib/sftp-server"
+
Expand Down
4 changes: 3 additions & 1 deletion make/dropbear/patches/130-standalone.patch
Expand Up @@ -22,18 +22,20 @@
}
--- localoptions.h
+++ localoptions.h
@@ -1,12 +1,23 @@
@@ -1,13 +1,25 @@
#ifndef DROPBEAR_LOCALOPTIONS_H_
#define DROPBEAR_LOCALOPTIONS_H_

+#ifndef DB_NONFREETZ
#define DSS_PRIV_FILENAME "/mod/etc/ssh/dss_host_key"
#define RSA_PRIV_FILENAME "/mod/etc/ssh/rsa_host_key"
#define ECDSA_PRIV_FILENAME "/mod/etc/ssh/ecdsa_host_key"
#define ED25519_PRIV_FILENAME "/mod/etc/ssh/ed25519_host_key"
+#else
+#define DSS_PRIV_FILENAME "/var/tmp/dss_host_key"
+#define RSA_PRIV_FILENAME "/var/tmp/rsa_host_key"
+#define ECDSA_PRIV_FILENAME "/var/tmp/ecdsa_host_key"
+#define ED25519_PRIV_FILENAME "/var/tmp/ed25519_host_key"
+#endif

#define SFTPSERVER_PATH "/usr/lib/sftp-server"
Expand Down
2 changes: 1 addition & 1 deletion make/dropbear/patches/250-login-limits.patch
@@ -1,6 +1,6 @@
--- localoptions.h
+++ localoptions.h
@@ -20,4 +20,9 @@
@@ -22,4 +22,9 @@
#define DROPBEAR_PATH_SSH_PROGRAM "ssh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion make/dropbear/patches/360-PATH_option.patch
@@ -1,6 +1,6 @@
--- localoptions.h
+++ localoptions.h
@@ -25,4 +25,6 @@
@@ -27,4 +27,6 @@
#define MAX_AUTH_TRIES 2 /* limited by freetz, default 10 */
#define AUTH_TIMEOUT 60 /* limited by freetz down to 60 seconds, default 300 */

Expand Down

0 comments on commit a15c402

Please sign in to comment.