diff cli-runopts.c @ 1687:f8d8af12ac14

Make "dbclient -m help -c help" work
author Matt Johnston <matt@ucc.asn.au>
date Tue, 26 May 2020 20:15:39 +0800
parents 21dabe66f2c8
children df8d8ec1801c
line wrap: on
line diff
--- a/cli-runopts.c	Tue May 26 20:15:00 2020 +0800
+++ b/cli-runopts.c	Tue May 26 20:15:39 2020 +0800
@@ -378,6 +378,11 @@
 		}
 	}
 
+#if DROPBEAR_USER_ALGO_LIST
+	/* -c help doesn't need a hostname */
+	parse_ciphers_macs();
+#endif
+
 	/* Done with options/flags; now handle the hostname (which may not
 	 * start with a hyphen) and optional command */
 
@@ -408,10 +413,6 @@
 
 	/* And now a few sanity checks and setup */
 
-#if DROPBEAR_USER_ALGO_LIST
-	parse_ciphers_macs();
-#endif
-
 #if DROPBEAR_CLI_PROXYCMD                                                                                                                                   
 	if (cli_opts.proxycmd) {
 		/* To match the common path of m_freeing it */