فهرست منبع

force random number generator early

David Rose 23 سال پیش
والد
کامیت
4784897b02
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      panda/src/downloader/httpClient.cxx

+ 5 - 0
panda/src/downloader/httpClient.cxx

@@ -25,6 +25,7 @@
 
 #ifdef HAVE_SSL
 
+#include <openssl/rand.h>
 #ifndef NDEBUG
 #include <openssl/err.h>
 #endif
@@ -155,6 +156,10 @@ initialize_ssl() {
 #endif
   OpenSSL_add_all_algorithms();
 
+  // Call RAND_status() here to force the random number generator to
+  // initialize early.
+  RAND_status();
+
   _ssl_initialized = true;
 }