diff options
author | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-05-27 10:33:38 +0900 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2017-12-07 13:16:35 -0500 |
commit | d269e07fa49952d7b414cee8636626bf2ac0affa (patch) | |
tree | e7712798b8f6d95a43ac793cc621ff9e2c05b18e /deps/openssl/openssl/apps/app_rand.c | |
parent | af446a98b9402180116f020cf76dbb5b23270234 (diff) | |
download | android-node-v8-d269e07fa49952d7b414cee8636626bf2ac0affa.tar.gz android-node-v8-d269e07fa49952d7b414cee8636626bf2ac0affa.tar.bz2 android-node-v8-d269e07fa49952d7b414cee8636626bf2ac0affa.zip |
deps: add -no_rand_screen to openssl s_client
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/openssl/openssl/apps/app_rand.c')
-rw-r--r-- | deps/openssl/openssl/apps/app_rand.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/openssl/openssl/apps/app_rand.c b/deps/openssl/openssl/apps/app_rand.c index 7f40bba764..b6fe294a68 100644 --- a/deps/openssl/openssl/apps/app_rand.c +++ b/deps/openssl/openssl/apps/app_rand.c @@ -124,7 +124,16 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) char buffer[200]; #ifdef OPENSSL_SYS_WINDOWS - RAND_screen(); + /* + * allocate 2 to dont_warn not to use RAND_screen() via + * -no_rand_screen option in s_client + */ + if (dont_warn != 2) { + BIO_printf(bio_e, "Loading 'screen' into random state -"); + BIO_flush(bio_e); + RAND_screen(); + BIO_printf(bio_e, " done\n"); + } #endif if (file == NULL) |