Commit 6f0cc2a6 authored by Joey Yandle's avatar Joey Yandle Committed by Rich Salz
Browse files

cherry pick pr-512 changes

parent 42af7479
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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);
}
+2 −11
Original line number Diff line number Diff line
@@ -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<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_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

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.
+0 −3
Original line number Diff line number Diff line
@@ -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
+0 −2
Original line number Diff line number Diff line
@@ -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 */