summaryrefslogtreecommitdiffhomepage
path: root/svr-runopts.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/svr-runopts.c b/svr-runopts.c
index d7a0d5a..d430825 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -57,6 +57,9 @@ static void printhelp(const char * progname) {
#if DROPBEAR_ECDSA
" - ecdsa %s\n"
#endif
+#if DROPBEAR_ED25519
+ " - ed25519 %s\n"
+#endif
#if DROPBEAR_DELAY_HOSTKEY
"-R Create hostkeys as required\n"
#endif
@@ -117,6 +120,9 @@ static void printhelp(const char * progname) {
#if DROPBEAR_ECDSA
ECDSA_PRIV_FILENAME,
#endif
+#if DROPBEAR_ED25519
+ ED25519_PRIV_FILENAME,
+#endif
MAX_AUTH_TRIES,
DROPBEAR_MAX_PORTS, DROPBEAR_DEFPORT, DROPBEAR_PIDFILE,
DEFAULT_RECV_WINDOW, DEFAULT_KEEPALIVE, DEFAULT_IDLE_TIMEOUT);
@@ -538,6 +544,13 @@ static void loadhostkey(const char *keyfile, int fatal_duplicate) {
}
#endif
#endif /* DROPBEAR_ECDSA */
+
+#if DROPBEAR_ED25519
+ if (type == DROPBEAR_SIGNKEY_ED25519) {
+ loadhostkey_helper("ed25519", (void**)&read_key->ed25519key, (void**)&svr_opts.hostkey->ed25519key, fatal_duplicate);
+ }
+#endif
+
sign_key_free(read_key);
TRACE(("leave loadhostkey"))
}
@@ -579,6 +592,9 @@ void load_all_hostkeys() {
#if DROPBEAR_ECDSA
loadhostkey(ECDSA_PRIV_FILENAME, 0);
#endif
+#if DROPBEAR_ED25519
+ loadhostkey(ED25519_PRIV_FILENAME, 0);
+#endif
}
#if DROPBEAR_RSA
@@ -642,6 +658,14 @@ void load_all_hostkeys() {
#endif
#endif /* DROPBEAR_ECDSA */
+#if DROPBEAR_ED25519
+ if (!svr_opts.delay_hostkey && !svr_opts.hostkey->ed25519key) {
+ disablekey(DROPBEAR_SIGNKEY_ED25519);
+ } else {
+ any_keys = 1;
+ }
+#endif
+
if (!any_keys) {
dropbear_exit("No hostkeys available. 'dropbear -R' may be useful or run dropbearkey.");
}