wez             Thu Dec 12 10:51:11 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/openssl/tests     001.phpt 
  Log:
  MFH more entropy "fix"
  
  
Index: php4/ext/openssl/tests/001.phpt
diff -u php4/ext/openssl/tests/001.phpt:1.3 php4/ext/openssl/tests/001.phpt:1.3.4.1
--- php4/ext/openssl/tests/001.phpt:1.3 Fri Aug  9 16:56:51 2002
+++ php4/ext/openssl/tests/001.phpt     Thu Dec 12 10:51:10 2002
@@ -9,6 +9,15 @@
 <?php
 echo "Creating private key\n";
 
+/* stack up some entropy; performance is not critical,
+ * and being slow will most likely even help the test.
+ */
+for ($z = "", $i = 0; $i < 1024; $i++) {
+       $z .= $i * $i;
+       if (function_exists("usleep"))
+               usleep($i);
+}
+
 $privkey = openssl_pkey_new();
 
 if ($privkey === false)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to