]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
PR: 2100
authorDr. Stephen Henson <steve@openssl.org>
Wed, 17 Feb 2010 14:32:01 +0000 (14:32 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 17 Feb 2010 14:32:01 +0000 (14:32 +0000)
Submitted by: James Baker <jbaker@tableausoftware.com> et al.

Workaround for slow Heap32Next on some versions of Windows.

CHANGES
crypto/rand/rand_win.c

diff --git a/CHANGES b/CHANGES
index bafe422807e3874b794d49daaf90ecd7fdeab336..dca7ce58d7c9c946a1dd1d9f2bed7ba44f59575d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 0.9.8l and 0.9.8m [xx XXX xxxx]
 
+  *) On some versions of WIN32 Heap32Next is very slow. This can cause
+     excessive delays in the RAND_poll(): over a minute. As a workaround
+     include a time check in the inner Heap32Next loop too.
+     [Steve Henson]
+
   *) The code that handled flushing of data in SSL/TLS originally used the
      BIO_CTRL_INFO ctrl to see if any data was pending first. This caused
      the problem outlined in PR#1949. The fix suggested there however can
index 9bad067f43202540c7b79d71713c258f7d1e9061..5198351cf34ea99b562c146ad040eb9f7215ff69 100644 (file)
@@ -527,6 +527,7 @@ int RAND_poll(void)
                                                        RAND_add(&hentry,
                                                                hentry.dwSize, 5);
                                                while (heap_next(&hentry)
+                                               && (!good || (GetTickCount()-starttime)<MAXDELAY)
                                                        && --entrycnt > 0);
                                                }
                                                }