cherry pick pr-512 changes
authorJoey Yandle <xoloki@gmail.com>
Wed, 13 Jan 2016 05:27:27 +0000 (21:27 -0800)
committerRich Salz <rsalz@openssl.org>
Sun, 29 May 2016 17:36:59 +0000 (13:36 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1079)

apps/winrand.c
doc/crypto/RAND_add.pod
doc/crypto/rand.pod
include/openssl/rand.h

index e65605e26c362f6f11058eedce020499d28e5d08..27d6037576018abb72562df58e6279385dd1baa7 100644 (file)
@@ -88,13 +88,5 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
         return 0;
     }
 
         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);
 }
     return DefWindowProc(hwnd, iMsg, wParam, lParam);
 }
index b2ffcb6197163c971f264cb68831232054b28cf2..fd830b49ee8143bb6cc181f8808f0d35b3546865 100644 (file)
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
 
 =head1 NAME
 
-RAND_add, RAND_seed, RAND_status, RAND_event - add
+RAND_add, RAND_seed, RAND_status - add
 entropy to the PRNG
 
 =head1 SYNOPSIS
 entropy to the PRNG
 
 =head1 SYNOPSIS
@@ -15,8 +15,6 @@ entropy to the PRNG
 
  int  RAND_status(void);
 
 
  int  RAND_status(void);
 
- int  RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam);
-
 =head1 DESCRIPTION
 
 RAND_add() mixes the B<num> bytes at B<buf> into the PRNG state. Thus,
 =head1 DESCRIPTION
 
 RAND_add() mixes the B<num> bytes at B<buf> into the PRNG state. Thus,
@@ -41,16 +39,9 @@ or L<RAND_load_file(3)>.
 
 RAND_seed() is equivalent to RAND_add() when B<num == entropy>.
 
 
 RAND_seed() is equivalent to RAND_add() when B<num == entropy>.
 
-RAND_event() collects the entropy from Windows events such as mouse
-movements and other user interaction. It should be called with the
-B<iMsg>, B<wParam> and B<lParam> arguments of I<all> 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
 
 =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.
 with enough data, 0 otherwise.
 
 The other functions do not return values.
index 9e3a5a052b09d78237a781a76b17112e2cdd14dc..78a9d57820ae694be492904e6693a129a774be20 100644 (file)
@@ -27,9 +27,6 @@ rand - pseudo-random number generator
  const RAND_METHOD *RAND_get_rand_method(void);
  RAND_METHOD *RAND_OpenSSL(void);
 
  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
 Deprecated:
 
  #if OPENSSL_API_COMPAT < 0x10100000L
index 8b0188d74af76acd2a4eed0c39c38ff86dfbd5ac..4d7e6eaebe7b1524d9cc4a753395900aae91cb33 100644 (file)
@@ -67,8 +67,6 @@ int RAND_poll(void);
 
 # if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 
 
 # if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 
-int RAND_event(UINT, WPARAM, LPARAM);
-
 # endif
 
 /* BEGIN ERROR CODES */
 # endif
 
 /* BEGIN ERROR CODES */