Remove OpenSSL PRNG reseeding
Per https://download.libsodium.org/doc/generating_random_data/ reseeding the default libsodium PRNG is not required.
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <openssl/rand.h>
|
||||
|
||||
// If we don't want a message to be processed by Qt, return true and set result to
|
||||
// the value that the window procedure should return. Otherwise return false.
|
||||
bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult)
|
||||
@@ -22,16 +20,6 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pM
|
||||
|
||||
MSG *pMsg = static_cast<MSG *>(pMessage);
|
||||
|
||||
// Seed OpenSSL PRNG with Windows event data (e.g. mouse movements and other user interactions)
|
||||
if (RAND_event(pMsg->message, pMsg->wParam, pMsg->lParam) == 0) {
|
||||
// Warn only once as this is performance-critical
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
LogPrint("%s: OpenSSL RAND_event() failed to seed OpenSSL PRNG with enough data.\n", __func__);
|
||||
warned = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch(pMsg->message)
|
||||
{
|
||||
case WM_QUERYENDSESSION:
|
||||
|
||||
Reference in New Issue
Block a user