wez Thu Dec 12 10:50:10 2002 EDT
Modified files:
/php4/ext/openssl/tests 001.phpt
Log:
Attempt to add more entropy for key generation.
Index: php4/ext/openssl/tests/001.phpt
diff -u php4/ext/openssl/tests/001.phpt:1.3 php4/ext/openssl/tests/001.phpt:1.4
--- 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:50: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