diff cli-runopts.c @ 442:d82a2a44c684

Add -u option to specify /dev/urandom instead
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Apr 2007 13:39:50 +0000
parents ab57ba0cb667
children 2cd2edfa11ee
line wrap: on
line diff
--- a/cli-runopts.c	Sat Mar 17 06:30:11 2007 +0000
+++ b/cli-runopts.c	Mon Apr 16 13:39:50 2007 +0000
@@ -29,6 +29,7 @@
 #include "dbutil.h"
 #include "algo.h"
 #include "tcpfwd.h"
+#include "random.h"
 
 cli_runopts cli_opts; /* GLOBAL */
 
@@ -53,6 +54,7 @@
 					"-N    Don't run a remote command\n"
 					"-f    Run in background after auth\n"
 					"-y    Always accept remote host key if unknown\n"
+					"-u    Use /dev/urandom - use with caution\n"
 #ifdef ENABLE_CLI_PUBKEY_AUTH
 					"-i <identityfile>   (multiple allowed)\n"
 #endif
@@ -86,6 +88,7 @@
 	char* dummy = NULL; /* Not used for anything real */
 
 	/* see printhelp() for options */
+	opts.listen_fwd_all = 0;
 	cli_opts.progname = argv[0];
 	cli_opts.remotehost = NULL;
 	cli_opts.remoteport = NULL;
@@ -100,7 +103,6 @@
 #endif
 #ifdef ENABLE_CLI_LOCALTCPFWD
 	cli_opts.localfwds = NULL;
-	opts.listen_fwd_all = 0;
 #endif
 #ifdef ENABLE_CLI_REMOTETCPFWD
 	cli_opts.remotefwds = NULL;
@@ -198,6 +200,9 @@
 					printhelp();
 					exit(EXIT_SUCCESS);
 					break;
+				case 'u':
+					random_dev = DROPBEAR_URANDOM_DEV;
+					break;
 #ifdef DEBUG_TRACE
 				case 'v':
 					debug_trace = 1;