add early_random_seed

This commit is contained in:
David Rose 2002-09-30 22:04:21 +00:00
parent ea208dfdbf
commit 77e2dc76d3
3 changed files with 13 additions and 1 deletions

View File

@ -62,6 +62,14 @@ const float extractor_frequency =
const int patcher_buffer_size =
config_downloader.GetInt("patcher-buffer-size", 4096);
// Configure this true (the default) to compute the SSL random seed
// early on in the application (specifically, when the first
// HTTPClient is created), or false to defer this until it is actually
// needed, causing a delay the first time a https connection is
// attempted.
const bool early_random_seed =
config_downloader.GetBool("early-random-seed", 1);
ConfigureFn(config_downloader) {
#ifdef HAVE_SSL
HTTPDocument::init_type();

View File

@ -38,4 +38,6 @@ extern const float extractor_frequency;
extern const int patcher_buffer_size;
extern const bool early_random_seed;
#endif

View File

@ -158,7 +158,9 @@ initialize_ssl() {
// Call RAND_status() here to force the random number generator to
// initialize early.
RAND_status();
if (early_random_seed) {
RAND_status();
}
_ssl_initialized = true;
}