comparison svr-chansession.c @ 687:167fdc091c05

Improve RNG seeding. Try to read from /dev/urandom multiple times, take input from extra sources, and use /dev/random when generating private keys
author Matt Johnston <matt@ucc.asn.au>
date Fri, 29 Jun 2012 23:19:43 +0800
parents 405418f7dc5e
children bcfa7f779531
comparison
equal deleted inserted replaced
683:63f8d6c469cf 687:167fdc091c05
869 /* wipe the hostkey */ 869 /* wipe the hostkey */
870 sign_key_free(svr_opts.hostkey); 870 sign_key_free(svr_opts.hostkey);
871 svr_opts.hostkey = NULL; 871 svr_opts.hostkey = NULL;
872 872
873 /* overwrite the prng state */ 873 /* overwrite the prng state */
874 reseedrandom(); 874 seedrandom();
875 #endif 875 #endif
876 876
877 /* clear environment */ 877 /* clear environment */
878 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD 878 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
879 * etc. This is hazardous, so should only be used for debugging. */ 879 * etc. This is hazardous, so should only be used for debugging. */