summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-02-17 14:32:01 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-02-17 14:32:01 +0000
commit657b02d0cfa4a84765dc20b0e5eab20cb93988bb (patch)
tree27eb4233690977e1ac9bc324c6b071c12b609492
parentb50ef8b21668c8fbd83771808f2c102b966d3408 (diff)
PR: 2100
Submitted by: James Baker <jbaker@tableausoftware.com> et al. Workaround for slow Heap32Next on some versions of Windows.
-rw-r--r--CHANGES5
-rw-r--r--crypto/rand/rand_win.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index bafe422807..dca7ce58d7 100644
--- 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
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 9bad067f43..5198351cf3 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -527,6 +527,7 @@ int RAND_poll(void)
RAND_add(&hentry,
hentry.dwSize, 5);
while (heap_next(&hentry)
+ && (!good || (GetTickCount()-starttime)<MAXDELAY)
&& --entrycnt > 0);
}
}