From: Joey Yandle Date: Wed, 13 Jan 2016 05:27:27 +0000 (-0800) Subject: cherry pick pr-512 changes X-Git-Tag: OpenSSL_1_1_0-pre6~651 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6f0cc2a6f8a7da5b68e5665589f307683a9a85f4;p=oweals%2Fopenssl.git cherry pick pr-512 changes Reviewed-by: Matt Caswell Reviewed-by: Tim Hudson Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1079) --- diff --git a/apps/winrand.c b/apps/winrand.c index e65605e26c..27d6037576 100644 --- a/apps/winrand.c +++ b/apps/winrand.c @@ -88,13 +88,5 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) return 0; } - if (RAND_event(iMsg, wParam, lParam) == 1 && seeded == 0) { - seeded = 1; - if (RAND_write_file(filename) <= 0) - MessageBox(hwnd, "Couldn't write random file!", - "OpenSSL", MB_OK | MB_ICONERROR); - PostQuitMessage(0); - } - return DefWindowProc(hwnd, iMsg, wParam, lParam); } diff --git a/doc/crypto/RAND_add.pod b/doc/crypto/RAND_add.pod index b2ffcb6197..fd830b49ee 100644 --- a/doc/crypto/RAND_add.pod +++ b/doc/crypto/RAND_add.pod @@ -2,7 +2,7 @@ =head1 NAME -RAND_add, RAND_seed, RAND_status, RAND_event - add +RAND_add, RAND_seed, RAND_status - add entropy to the PRNG =head1 SYNOPSIS @@ -15,8 +15,6 @@ entropy to the PRNG int RAND_status(void); - int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam); - =head1 DESCRIPTION RAND_add() mixes the B bytes at B into the PRNG state. Thus, @@ -41,16 +39,9 @@ or L. RAND_seed() is equivalent to RAND_add() when B. -RAND_event() collects the entropy from Windows events such as mouse -movements and other user interaction. It should be called with the -B, B and B arguments of I messages sent to -the window procedure. It will estimate the entropy contained in the -event message (if any), and add it to the PRNG. The program can then -process the messages as usual. - =head1 RETURN VALUES -RAND_status() and RAND_event() return 1 if the PRNG has been seeded +RAND_status() returns 1 if the PRNG has been seeded with enough data, 0 otherwise. The other functions do not return values. diff --git a/doc/crypto/rand.pod b/doc/crypto/rand.pod index 9e3a5a052b..78a9d57820 100644 --- a/doc/crypto/rand.pod +++ b/doc/crypto/rand.pod @@ -27,9 +27,6 @@ rand - pseudo-random number generator const RAND_METHOD *RAND_get_rand_method(void); RAND_METHOD *RAND_OpenSSL(void); - /* For Win32 only */ - int RAND_event(UINT, WPARAM, LPARAM); - Deprecated: #if OPENSSL_API_COMPAT < 0x10100000L diff --git a/include/openssl/rand.h b/include/openssl/rand.h index 8b0188d74a..4d7e6eaebe 100644 --- a/include/openssl/rand.h +++ b/include/openssl/rand.h @@ -67,8 +67,6 @@ int RAND_poll(void); # if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) -int RAND_event(UINT, WPARAM, LPARAM); - # endif /* BEGIN ERROR CODES */