The workaround for this issue is hat was added for 0.9.8m is only applied in 
an #ifdef _MSC_VER codebranch.
This bug is also triggered when building openssl in mingw so it should be 
applied for this, too. It might account for reports that users are still 
running into this problem with recent versions.

Attached patch for crytpo/rand/rand_win.c adds the timeout check there, too.

Regards,
Andre

diff -Nru -x '*~' openssl-1.0.0d.orig/crypto/rand/rand_win.c openssl-1.0.0d/crypto/rand/rand_win.c
--- openssl-1.0.0d.orig/crypto/rand/rand_win.c	2010-03-22 23:44:35.000000000 +0100
+++ openssl-1.0.0d/crypto/rand/rand_win.c	2012-01-08 23:50:11.299238600 +0100
@@ -557,6 +557,7 @@
 							RAND_add(&hentry,
 								hentry.dwSize, 5);
 						while (heap_next(&hentry)
+							&& (!good || (GetTickCount()-starttime)<MAXDELAY)
 							&& --entrycnt > 0);
 						}
 					} while (heaplist_next(handle, &hlist)

Reply via email to