mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
add early_random_seed
This commit is contained in:
parent
ea208dfdbf
commit
77e2dc76d3
@ -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();
|
||||
|
@ -38,4 +38,6 @@ extern const float extractor_frequency;
|
||||
|
||||
extern const int patcher_buffer_size;
|
||||
|
||||
extern const bool early_random_seed;
|
||||
|
||||
#endif
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user