X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=dac3dbc397b149491364c5cb8e1af006502d64f1;hp=2e607b67c7195013b87b9c8b7035524f929239ab;hb=4811afa073c871f2a52dfd5139bd0171046365eb;hpb=ec12269355f7979fdc0783dc15d109832f1e83cd diff --git a/src/tincd.c b/src/tincd.c index 2e607b67..dac3dbc3 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tincd.c,v 1.10.4.20 2000/10/29 22:10:44 guus Exp $ + $Id: tincd.c,v 1.10.4.22 2000/10/30 00:22:54 guus Exp $ */ #include "config.h" @@ -102,14 +102,14 @@ usage(int status) else { printf(_("Usage: %s [option]...\n\n"), program_name); - printf(_(" -c, --config=DIR Read configuration options from DIR.\n" - " -D, --no-detach Don't fork and detach.\n" - " -d Increase debug level.\n" - " -k, --kill Attempt to kill a running tincd and exit.\n" - " -n, --net=NETNAME Connect to net NETNAME.\n")); - printf(_(" -K, --keygen[=BITS] Generate public/private RSA keypair.\n" - " --help Display this help and exit.\n" - " --version Output version information and exit.\n\n")); + printf(_(" -c, --config=DIR Read configuration options from DIR.\n" + " -D, --no-detach Don't fork and detach.\n" + " -d Increase debug level.\n" + " -k, --kill Attempt to kill a running tincd and exit.\n" + " -n, --net=NETNAME Connect to net NETNAME.\n")); + printf(_(" -K, --generate-keys[=BITS] Generate public/private RSA keypair.\n" + " --help Display this help and exit.\n" + " --version Output version information and exit.\n\n")); printf(_("Report bugs to tinc@nl.linux.org.\n")); } exit(status); @@ -205,9 +205,6 @@ int keygen(int bits) { RSA *rsa_key; - fprintf(stderr, _("Seeding the PRNG: please press some keys or move\nthe mouse if this program seems to have halted...\n")); - RAND_load_file("/dev/random", 1024); /* OpenSSL PRNG state apparently uses 1024 bytes, but it seems pretty sufficient anyway :) */ - fprintf(stderr, _("Generating %d bits keys:\n"), bits); rsa_key = RSA_generate_key(bits, 0xFFFF, indicator, NULL); if(!rsa_key) @@ -423,6 +420,10 @@ main(int argc, char **argv, char **envp) make_names(); + /* Slllluuuuuuurrrrp! */ + + RAND_load_file("/dev/urandom", 1024); + if(generate_keys) exit(keygen(generate_keys)); @@ -536,11 +537,6 @@ RETSIGTYPE sigusr2_handler(int a) { dump_subnet_list(); -/* FIXME: reprogram this. - if(debug_lvl > DEBUG_NOTHING) - syslog(LOG_NOTICE, _("Got USR2 signal, forcing new key generation")); - regenerate_keys(); -*/ } RETSIGTYPE