cvs: php4 /ext/openssl/tests 001.phpt

From: Date: Thu, 12 Dec 2002 15:50:10 +0000
Subject: cvs: php4 /ext/openssl/tests 001.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17181@lists.php.net to get a copy of this message
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)

« previous php.cvs (#17181) next »