[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c
moriyoshiWed, 20 Jul 2011 08:43:12 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313466 Log: - Better error handling. Changed paths: U php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c U php/php-src/trunk/sapi/cli/php_cli_server.c Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c === --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-07-20 07:48:08 UTC (rev 313465) +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-07-20 08:43:12 UTC (rev 313466) @@ -1805,9 +1805,9 @@ int err = 0; int port = 3000; php_socket_t server_sock = SOCK_ERR; + char *p = NULL; if (addr[0] == '[') { - char *p; host = pestrdup(addr + 1, 1); if (!host) { return FAILURE; @@ -1817,27 +1817,32 @@ *p++ = '\0'; if (*p == ':') { port = strtol(p + 1, p, 10); + if (port = 0) { + p = NULL; + } } else if (*p != '\0') { p = NULL; } } - if (!p) { - fprintf(stderr, Invalid IPv6 address: %s\n, host); - retval = FAILURE; - goto out; - } } else { - char *p; host = pestrdup(addr, 1); if (!host) { return FAILURE; } - p = strrchr(host, ':'); + p = strchr(host, ':'); if (p) { *p++ = '\0'; port = strtol(p, p, 10); + if (port = 0) { + p = NULL; + } } } + if (!p) { + fprintf(stderr, Invalid address: %s\n, addr); + retval = FAILURE; + goto out; + } server_sock = php_network_listen_socket(host, port, SOCK_STREAM, server-address_family, server-socklen, errstr TSRMLS_CC); if (server_sock == SOCK_ERR) { Modified: php/php-src/trunk/sapi/cli/php_cli_server.c === --- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-20 07:48:08 UTC (rev 313465) +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-20 08:43:12 UTC (rev 313466) @@ -1805,9 +1805,9 @@ int err = 0; int port = 3000; php_socket_t server_sock = SOCK_ERR; + char *p = NULL; if (addr[0] == '[') { - char *p; host = pestrdup(addr + 1, 1); if (!host) { return FAILURE; @@ -1817,27 +1817,32 @@ *p++ = '\0'; if (*p == ':') { port = strtol(p + 1, p, 10); + if (port = 0) { + p = NULL; + } } else if (*p != '\0') { p = NULL; } } - if (!p) { - fprintf(stderr, Invalid IPv6 address: %s\n, host); - retval = FAILURE; - goto out; - } } else { - char *p; host = pestrdup(addr, 1); if (!host) { return FAILURE; } - p = strrchr(host, ':'); + p = strchr(host, ':'); if (p) { *p++ = '\0'; port = strtol(p, p, 10); + if (port = 0) { + p = NULL; + } } } + if (!p) { + fprintf(stderr, Invalid address: %s\n, addr); + retval = FAILURE; + goto out; + } server_sock = php_network_listen_socket(host, port, SOCK_STREAM, server-address_family, server-socklen, errstr TSRMLS_CC); if (server_sock == SOCK_ERR) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c
moriyoshiWed, 20 Jul 2011 09:00:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313467 Log: Fixed bug #55071. Maybe a bit overkill? Bug: https://bugs.php.net/55071 (Re-Opened) Change in-built web server description Changed paths: U php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c U php/php-src/trunk/sapi/cli/php_cli_server.c Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c === --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-07-20 08:43:12 UTC (rev 313466) +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-07-20 09:00:20 UTC (rev 313467) @@ -2127,7 +2127,19 @@ } sapi_module.phpinfo_as_text = 0; - printf(PHP Development Server is listening on %s in %s ... Press Ctrl-C to quit.\n, server_bind_address, document_root); + { + struct timeval tv; + struct tm tm; + char buf[52]; + gettimeofday(tv, NULL); + php_localtime_r(tv.tv_sec, tm); + php_asctime_r(tm, buf); + printf(PHP Development Server started at %s + Listening on %s\n + Document root is %s\n + Press Ctrl-C to quit.\n, + buf, server_bind_address, document_root); + } #if defined(HAVE_SIGNAL_H) defined(SIGINT) signal(SIGINT, php_cli_server_sigint_handler); Modified: php/php-src/trunk/sapi/cli/php_cli_server.c === --- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-20 08:43:12 UTC (rev 313466) +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-20 09:00:20 UTC (rev 313467) @@ -2127,7 +2127,19 @@ } sapi_module.phpinfo_as_text = 0; - printf(PHP Development Server is listening on %s in %s ... Press Ctrl-C to quit.\n, server_bind_address, document_root); + { + struct timeval tv; + struct tm tm; + char buf[52]; + gettimeofday(tv, NULL); + php_localtime_r(tv.tv_sec, tm); + php_asctime_r(tm, buf); + printf(PHP Development Server started at %s + Listening on %s\n + Document root is %s\n + Press Ctrl-C to quit.\n, + buf, server_bind_address, document_root); + } #if defined(HAVE_SIGNAL_H) defined(SIGINT) signal(SIGINT, php_cli_server_sigint_handler); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt branches/PHP_5_3/ext/date/tests/bug55253.phpt branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt branches/PHP_5_4/ext/da
danielc Wed, 20 Jul 2011 18:24:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313484 Log: Rename and enhance test for bug 55253 now that bugs web is up. Bug: https://bugs.php.net/55253 (Open) DateTime::add() and sub() result -1 hour on objects with time zone type 2 Changed paths: D php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt A + php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt (from php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt:r312286) D php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt A + php/php-src/branches/PHP_5_4/ext/date/tests/bug55253.phpt (from php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt:r313482) D php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt A + php/php-src/trunk/ext/date/tests/bug55253.phpt (from php/php-src/trunk/ext/date/tests/bug.add.zone2.phpt:r312289) Deleted: php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt 2011-07-20 17:40:18 UTC (rev 313483) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -1,33 +0,0 @@ ---TEST-- -DateTime::add() mistakenly modifies objects having zone type 2 ---CREDITS-- -Daniel Convissor dani...@php.net ---XFAIL-- -Bug exists ---FILE-- -?php - -date_default_timezone_set('America/New_York'); - -$interval = new DateInterval('PT2H1M'); - -$date3 = new DateTime('2010-10-04 02:18:48'); -$date2 = new DateTime('2010-10-04 02:18:48 EDT'); - -echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; -echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; - -echo $interval-format('Add %h hours %i minutes') . \n; -$date3-add($interval); -$date2-add($interval); - -echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; -echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; - -? ---EXPECT-- -Zone Type 3: 2010-10-04 02:18:48 EDT -Zone Type 2: 2010-10-04 02:18:48 EDT -Add 2 hours 1 minutes -Zone Type 3: 2010-10-04 04:19:48 EDT -Zone Type 2: 2010-10-04 04:19:48 EDT Copied: php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt (from rev 312286, php/php-src/branches/PHP_5_3/ext/date/tests/bug.add.zone2.phpt) === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -0,0 +1,47 @@ +--TEST-- +DateTime::add() and sub() result -1 hour on objects with time zone type 2 +--CREDITS-- +Daniel Convissor dani...@php.net +--XFAIL-- +Bug 55253 exists +--FILE-- +?php + +date_default_timezone_set('America/New_York'); + +$interval = new DateInterval('PT2H1M'); + +$date3 = new DateTime('2010-10-04 02:18:48'); +$date2 = new DateTime('2010-10-04 02:18:48 EDT'); + +echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; +echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; + +echo $interval-format('Add %h hours %i minutes') . \n; +$date3-add($interval); +$date2-add($interval); + +echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; +echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; + +// Try subtracting from expected result. +$date3 = new DateTime('2010-10-04 04:19:48'); +$date2 = new DateTime('2010-10-04 04:19:48 EDT'); + +echo $interval-format('Subtract %h hours %i minutes from expected') . \n; +$date3-sub($interval); +$date2-sub($interval); + +echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; +echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; + +? +--EXPECT-- +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT +Add 2 hours 1 minutes +Zone Type 3: 2010-10-04 04:19:48 EDT +Zone Type 2: 2010-10-04 04:19:48 EDT +Subtract 2 hours 1 minutes from expected +Zone Type 3: 2010-10-04 02:18:48 EDT +Zone Type 2: 2010-10-04 02:18:48 EDT Deleted: php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt === --- php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt 2011-07-20 17:40:18 UTC (rev 313483) +++ php/php-src/branches/PHP_5_4/ext/date/tests/bug.add.zone2.phpt 2011-07-20 18:24:14 UTC (rev 313484) @@ -1,33 +0,0 @@ ---TEST-- -DateTime::add() mistakenly modifies objects having zone type 2 ---CREDITS-- -Daniel Convissor dani...@php.net ---XFAIL-- -Bug exists ---FILE-- -?php - -date_default_timezone_set('America/New_York'); - -$interval = new DateInterval('PT2H1M'); - -$date3 = new DateTime('2010-10-04 02:18:48'); -$date2 = new DateTime('2010-10-04 02:18:48 EDT'); - -echo 'Zone Type 3: ' . $date3-format('Y-m-d H:i:s T') . \n; -echo 'Zone Type 2: ' . $date2-format('Y-m-d H:i:s T') . \n; - -echo $interval-format('Add %h hours %i minutes') .
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mcrypt/tests/bug55169.phpt branches/PHP_5_3/ext/openssl/tests/bug55169.phpt branches/PHP_5_4/ext/mcrypt/tests/bug55169.phpt branches/PHP_5_4/ext/opens
yaauie Wed, 20 Jul 2011 18:59:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313485 Log: tests for bug #55169 (mcrypt and openssl) Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to gather sufficient random data Changed paths: A php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug55169.phpt A php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt A php/php-src/branches/PHP_5_4/ext/mcrypt/tests/bug55169.phpt A php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt A php/php-src/trunk/ext/mcrypt/tests/bug55169.phpt A php/php-src/trunk/ext/openssl/tests/bug55169.phpt Added: php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug55169.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug55169.phpt 2011-07-20 18:59:05 UTC (rev 313485) @@ -0,0 +1,43 @@ +--TEST-- +mcrypt_create_iv +https://bugs.php.net/bug.php?id=55169 +--CREDIT-- +Ryan Biesemeyer r...@yaauie.com +--FILE-- +?php +for( $i=1; $i=64; $i = $i*2 ){ + echo 'Input: '. $i . PHP_EOL; + $random = mcrypt_create_iv( $i, MCRYPT_DEV_URANDOM ); + echo ' Length: ' . strlen( $random ) . PHP_EOL; + echo ' Hex: '. bin2hex( $random ) . PHP_EOL; + echo PHP_EOL; +} +? +--EXPECTF-- +Input: 1 + Length: 1 + Hex: %x + +Input: 2 + Length: 2 + Hex: %x + +Input: 4 + Length: 4 + Hex: %x + +Input: 8 + Length: 8 + Hex: %x + +Input: 16 + Length: 16 + Hex: %x + +Input: 32 + Length: 32 + Hex: %x + +Input: 64 + Length: 64 + Hex: %x Added: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 18:59:05 UTC (rev 313485) @@ -0,0 +1,43 @@ +--TEST-- +openssl_random_pseudo_bytes test +https://bugs.php.net/bug.php?id=55169 +--INI-- +extension=php_openssl.dll +--SKIPIF-- +if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' +--FILE-- +?php +for ($i = -1; $i = 4; $i++) { +$bytes = openssl_random_pseudo_bytes($i, $cstrong); +$hex = bin2hex($bytes); + +echo Lengths: Bytes: $i and Hex: . strlen($hex) . PHP_EOL; +var_dump($hex); +var_dump($cstrong); +echo PHP_EOL; +} +? +--EXPECTF-- +Lengths: Bytes: -1 and Hex: 0 +string(0) +NULL + +Lengths: Bytes: 0 and Hex: 0 +string(0) +NULL + +Lengths: Bytes: 1 and Hex: 2 +string(2) %x +bool(true) + +Lengths: Bytes: 2 and Hex: 4 +string(4) %x +bool(true) + +Lengths: Bytes: 3 and Hex: 6 +string(6) %x +bool(true) + +Lengths: Bytes: 4 and Hex: 8 +string(8) %x +bool(true) Added: php/php-src/branches/PHP_5_4/ext/mcrypt/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/mcrypt/tests/bug55169.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/mcrypt/tests/bug55169.phpt 2011-07-20 18:59:05 UTC (rev 313485) @@ -0,0 +1,43 @@ +--TEST-- +mcrypt_create_iv +https://bugs.php.net/bug.php?id=55169 +--CREDIT-- +Ryan Biesemeyer r...@yaauie.com +--FILE-- +?php +for( $i=1; $i=64; $i = $i*2 ){ + echo 'Input: '. $i . PHP_EOL; + $random = mcrypt_create_iv( $i, MCRYPT_DEV_URANDOM ); + echo ' Length: ' . strlen( $random ) . PHP_EOL; + echo ' Hex: '. bin2hex( $random ) . PHP_EOL; + echo PHP_EOL; +} +? +--EXPECTF-- +Input: 1 + Length: 1 + Hex: %x + +Input: 2 + Length: 2 + Hex: %x + +Input: 4 + Length: 4 + Hex: %x + +Input: 8 + Length: 8 + Hex: %x + +Input: 16 + Length: 16 + Hex: %x + +Input: 32 + Length: 32 + Hex: %x + +Input: 64 + Length: 64 + Hex: %x Added: php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 18:59:05 UTC (rev 313485) @@ -0,0 +1,43 @@ +--TEST-- +openssl_random_pseudo_bytes test +https://bugs.php.net/bug.php?id=55169 +--INI-- +extension=php_openssl.dll +--SKIPIF-- +if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' +--FILE-- +?php +for ($i = -1; $i = 4; $i++) { +$bytes = openssl_random_pseudo_bytes($i, $cstrong); +$hex = bin2hex($bytes); + +echo Lengths: Bytes: $i and Hex: . strlen($hex) . PHP_EOL; +var_dump($hex); +var_dump($cstrong); +echo PHP_EOL; +} +? +--EXPECTF-- +Lengths: Bytes: -1 and Hex: 0 +string(0) +NULL + +Lengths: Bytes: 0 and Hex: 0 +string(0) +NULL + +Lengths: Bytes: 1 and Hex: 2 +string(2) %x +bool(true) + +Lengths: Bytes: 2 and Hex: 4 +string(4) %x +bool(true) + +Lengths: Bytes: 3 and Hex: 6 +string(6) %x +bool(true) +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug55169.phpt branches/PHP_5_4/ext/openssl/tests/bug55169.phpt trunk/ext/openssl/tests/bug55169.phpt
yaauie Wed, 20 Jul 2011 20:57:17 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313487 Log: update test for bug #55169, don't require the extension in INI Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to gather sufficient random data Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt U php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt U php/php-src/trunk/ext/openssl/tests/bug55169.phpt Modified: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- Modified: php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- Modified: php/php-src/trunk/ext/openssl/tests/bug55169.phpt === --- php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug55169.phpt branches/PHP_5_4/ext/openssl/tests/bug55169.phpt trunk/ext/openssl/tests/bug55169.phpt
This is broken and clearly wasn't tested. Need ?php in the SKIPIF section as it executes the code there. - S On Jul 20, 2011, at 1:57 PM, Ryan Biesemeyer wrote: yaauie Wed, 20 Jul 2011 20:57:17 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313487 Log: update test for bug #55169, don't require the extension in INI Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to gather sufficient random data Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt U php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt U php/php-src/trunk/ext/openssl/tests/bug55169.phpt Modified: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- Modified: php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- Modified: php/php-src/trunk/ext/openssl/tests/bug55169.phpt === --- php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 19:39:22 UTC (rev 313486) +++ php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) @@ -1,8 +1,6 @@ --TEST-- openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 ---INI-- -extension=php_openssl.dll --SKIPIF-- if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug55169.phpt branches/PHP_5_4/ext/openssl/tests/bug55169.phpt trunk/ext/openssl/tests/bug55169.phpt
yaauie Wed, 20 Jul 2011 21:13:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313488 Log: update test for bug #55169, fix skipif Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to gather sufficient random data Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt U php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt U php/php-src/trunk/ext/openssl/tests/bug55169.phpt Modified: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) @@ -2,7 +2,9 @@ openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 --SKIPIF-- -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' +?php +if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; +? --FILE-- ?php for ($i = -1; $i = 4; $i++) { Modified: php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) +++ php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) @@ -2,7 +2,9 @@ openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 --SKIPIF-- -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' +?php +if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; +? --FILE-- ?php for ($i = -1; $i = 4; $i++) { Modified: php/php-src/trunk/ext/openssl/tests/bug55169.phpt === --- php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 20:57:17 UTC (rev 313487) +++ php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) @@ -2,7 +2,9 @@ openssl_random_pseudo_bytes test https://bugs.php.net/bug.php?id=55169 --SKIPIF-- -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension' +?php +if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; +? --FILE-- ?php for ($i = -1; $i = 4; $i++) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug55169.phpt branches/PHP_5_4/ext/openssl/tests/bug55169.phpt trunk/ext/openssl/tests/bug55169.phpt
yaauie Wed, 20 Jul 2011 21:25:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313489 Log: removing openssl test for bug #55169 per Scott MacVicar's request; duplicate coverage of opensssl_random_pseudo_bytes.phpt Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to gather sufficient random data Changed paths: D php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt D php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt D php/php-src/trunk/ext/openssl/tests/bug55169.phpt Deleted: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug55169.phpt 2011-07-20 21:25:39 UTC (rev 313489) @@ -1,43 +0,0 @@ ---TEST-- -openssl_random_pseudo_bytes test -https://bugs.php.net/bug.php?id=55169 ---SKIPIF-- -?php -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; -? ---FILE-- -?php -for ($i = -1; $i = 4; $i++) { -$bytes = openssl_random_pseudo_bytes($i, $cstrong); -$hex = bin2hex($bytes); - -echo Lengths: Bytes: $i and Hex: . strlen($hex) . PHP_EOL; -var_dump($hex); -var_dump($cstrong); -echo PHP_EOL; -} -? ---EXPECTF-- -Lengths: Bytes: -1 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 0 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 1 and Hex: 2 -string(2) %x -bool(true) - -Lengths: Bytes: 2 and Hex: 4 -string(4) %x -bool(true) - -Lengths: Bytes: 3 and Hex: 6 -string(6) %x -bool(true) - -Lengths: Bytes: 4 and Hex: 8 -string(8) %x -bool(true) Deleted: php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt === --- php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) +++ php/php-src/branches/PHP_5_4/ext/openssl/tests/bug55169.phpt 2011-07-20 21:25:39 UTC (rev 313489) @@ -1,43 +0,0 @@ ---TEST-- -openssl_random_pseudo_bytes test -https://bugs.php.net/bug.php?id=55169 ---SKIPIF-- -?php -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; -? ---FILE-- -?php -for ($i = -1; $i = 4; $i++) { -$bytes = openssl_random_pseudo_bytes($i, $cstrong); -$hex = bin2hex($bytes); - -echo Lengths: Bytes: $i and Hex: . strlen($hex) . PHP_EOL; -var_dump($hex); -var_dump($cstrong); -echo PHP_EOL; -} -? ---EXPECTF-- -Lengths: Bytes: -1 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 0 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 1 and Hex: 2 -string(2) %x -bool(true) - -Lengths: Bytes: 2 and Hex: 4 -string(4) %x -bool(true) - -Lengths: Bytes: 3 and Hex: 6 -string(6) %x -bool(true) - -Lengths: Bytes: 4 and Hex: 8 -string(8) %x -bool(true) Deleted: php/php-src/trunk/ext/openssl/tests/bug55169.phpt === --- php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 21:13:03 UTC (rev 313488) +++ php/php-src/trunk/ext/openssl/tests/bug55169.phpt 2011-07-20 21:25:39 UTC (rev 313489) @@ -1,43 +0,0 @@ ---TEST-- -openssl_random_pseudo_bytes test -https://bugs.php.net/bug.php?id=55169 ---SKIPIF-- -?php -if(!extension_loaded('openssl')) echo 'skip - requires openssl extension'; -? ---FILE-- -?php -for ($i = -1; $i = 4; $i++) { -$bytes = openssl_random_pseudo_bytes($i, $cstrong); -$hex = bin2hex($bytes); - -echo Lengths: Bytes: $i and Hex: . strlen($hex) . PHP_EOL; -var_dump($hex); -var_dump($cstrong); -echo PHP_EOL; -} -? ---EXPECTF-- -Lengths: Bytes: -1 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 0 and Hex: 0 -string(0) -NULL - -Lengths: Bytes: 1 and Hex: 2 -string(2) %x -bool(true) - -Lengths: Bytes: 2 and Hex: 4 -string(4) %x -bool(true) - -Lengths: Bytes: 3 and Hex: 6 -string(6) %x -bool(true) - -Lengths: Bytes: 4 and Hex: 8 -string(8) %x -bool(true) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php