[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Tue Nov 18 01:32:08 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3231r2=1.3232diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3231 php-src/ChangeLog:1.3232 --- php-src/ChangeLog:1.3231Mon Nov 17 01:32:26 2008 +++ php-src/ChangeLog Tue Nov 18 01:32:07 2008 @@ -1,3 +1,398 @@ +2008-11-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS: + More detailed bug fix description + +2008-11-17 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + ZendEngine2/zend_builtin_functions.c: + MFH: + - Changed 'strlen' to use ZEND_FUNCTION(strlen) + - Removed duplicated arginfo structs + +* ZendEngine2/zend_builtin_functions.c: + - Changed 'strlen' to use ZEND_FUNCTION(strlen) + - Removed duplicated arginfo structs + +2008-11-17 Scott MacVicar [EMAIL PROTECTED] + +* (PHP_5_3) + ext/openssl/tests/openssl_random_pseudo_bytes.phpt: + Missed test for previous commit + +* (PHP_5_3) + ext/openssl/openssl.c: + MFH Add openssl_random_pseudo_bytes() in order to expose access to a PRG, + this wraps around whatever the OS provides. + + - OpenBSD uses arc4random() + - Windows uses the Windows Crypto API + - FreeBSD, Linux, etc use /dev/random or /dev/urandom if available + [DOC] + +* ext/openssl/openssl.c + ext/openssl/tests/openssl_random_pseudo_bytes.phpt + ext/openssl/tests/openssl_random_pseudo_bytes.phpt: + Add openssl_random_pseudo_bytes() in order to expose access to a PRG, this + wraps around whatever the OS provides. + + - OpenBSD uses arc4random() + - Windows uses the Windows Crypto API + - FreeBSD, Linux, etc use /dev/random or /dev/urandom if available + [DOC] + +* (PHP_5_3) + ext/sqlite3/sqlite3.c: + MFH Fix #46033 - Segfault when instantiating SQLite3stmt and SQLite3Result + directly. + +* ext/sqlite3/sqlite3.c: + Fix #46033 - Segfault when instantiating SQLite3stmt and SQLite3Result + directly. + +2008-11-17 Stanislav Malyshev [EMAIL PROTECTED] + +* ZendEngine2/tests/ns_078.phpt + ZendEngine2/tests/ns_078.phpt: + + file ns_078.phpt was initially added on branch PHP_5_3. + +* (PHP_5_3) + ZendEngine2/zend_language_parser.y: + Improve use syntax + [DOC] use \foo\bar is the same as use foo\bar + +2008-11-17 Scott MacVicar [EMAIL PROTECTED] + +* ext/sqlite3/libsqlite/sqlite3.c + ext/sqlite3/libsqlite/sqlite3.h + ext/sqlite3/libsqlite/sqlite3ext.h: + Sync libsqlite to 3.6.5 + +2008-11-17 David Soria Parra [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS + configure.in: + MFH: Feature request #46595. Use cc as default compiler and fallback to + gcc. + +* configure.in: + Feature request #46595. Use cc as default compiler and fallback to gcc. + [DOC] + +2008-11-17 Ant Phillips [EMAIL PROTECTED] + +* ext/reflection/tests/reflectionClass_export_basic1.phpt + ext/reflection/tests/reflectionClass_export_basic1.phpt + ext/reflection/tests/reflectionClass_export_basic2.phpt + ext/reflection/tests/reflectionClass_export_basic2.phpt + ext/reflection/tests/reflectionClass_getExtensionName_basic.phpt + ext/reflection/tests/reflectionClass_getModifiers_basic.phpt + ext/reflection/tests/reflectionClass_hasMethod_basic.phpt + ext/reflection/tests/reflectionClass_isInterface_basic.phpt + ext/reflection/tests/reflectionObject___toString_basic1.phpt + ext/reflection/tests/reflectionObject___toString_basic1.phpt + ext/reflection/tests/reflectionObject___toString_basic2.phpt + ext/reflection/tests/reflectionObject___toString_basic2.phpt + ext/reflection/tests/reflectionObject_export_basic1.phpt + ext/reflection/tests/reflectionObject_export_basic1.phpt + ext/reflection/tests/reflectionObject_export_basic2.phpt + ext/reflection/tests/reflectionObject_export_basic2.phpt + ext/reflection/tests/reflectionObject_export_basic3.phpt + ext/reflection/tests/reflectionObject_export_basic3.phpt + ext/reflection/tests/reflectionProperty_constructor_variation1.phpt + ext/reflection/tests/reflectionProperty_constructor_variation1.phpt: + Commit tests for ext/reflection + +2008-11-17 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS + ZendEngine2/zend_API.h + ZendEngine2/zend_builtin_functions.c + ZendEngine2/zend_exceptions.c + ZendEngine2/zend_interfaces.c + ext/bcmath/bcmath.c + ext/bz2/bz2.c + ext/calendar/calendar.c + ext/com_dotnet/com_extension.c + ext/ctype/ctype.c + ext/curl/interface.c + ext/date/php_date.c + ext/dba/dba.c + ext/dom/attr.c + ext/dom/cdatasection.c + ext/dom/characterdata.c + ext/dom/comment.c +
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Tue Nov 18 01:32:11 2008 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1399r2=1.1400diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1399 ZendEngine2/ChangeLog:1.1400 --- ZendEngine2/ChangeLog:1.1399Mon Nov 17 01:32:31 2008 +++ ZendEngine2/ChangeLog Tue Nov 18 01:32:11 2008 @@ -1,3 +1,42 @@ +2008-11-17 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + zend_builtin_functions.c: + MFH: + - Changed 'strlen' to use ZEND_FUNCTION(strlen) + - Removed duplicated arginfo structs + +* zend_builtin_functions.c: + - Changed 'strlen' to use ZEND_FUNCTION(strlen) + - Removed duplicated arginfo structs + +2008-11-17 Stanislav Malyshev [EMAIL PROTECTED] + +* tests/ns_078.phpt + tests/ns_078.phpt: + + file ns_078.phpt was initially added on branch PHP_5_3. + +* (PHP_5_3) + zend_language_parser.y: + Improve use syntax + [DOC] use \foo\bar is the same as use foo\bar + +2008-11-17 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + zend_API.h + zend_builtin_functions.c + zend_exceptions.c + zend_interfaces.c: + - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro + +* zend_API.h + zend_builtin_functions.c + zend_exceptions.c + zend_interfaces.c: + - Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro (again!) + 2008-11-16 Felipe Pena [EMAIL PROTECTED] * (PHP_5_3) @@ -26608,7 +26647,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1399 2008/11/17 01:32:31 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1400 2008/11/18 01:32:11 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -28332,7 +28371,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1399 2008/11/17 01:32:31 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1400 2008/11/18 01:32:11 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/reflection/tests reflectionClass_export_basic1.phpt reflectionClass_export_basic2.phpt reflectionClass_getExtensionName_basic.phpt reflectionClass_getExtensionName
ant Mon Nov 17 11:20:18 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/reflection/tests reflectionClass_getModifiers_basic.phpt reflectionProperty_constructor_variation1.phpt reflectionClass_isInterface_basic.phpt reflectionClass_getExtensionName_basic.phpt reflectionObject_export_basic1.phpt reflectionClass_hasMethod_basic.phpt reflectionObject___toString_basic1.phpt reflectionClass_export_basic1.phpt reflectionObject___toString_basic2.phpt reflectionClass_getInterfaceNames_basic.phpt reflectionClass_getParentClass.phpt reflectionClass_getExtensionName_variation.phpt reflectionClass_getExtension_variation.phpt reflectionClass_isIterateable_variation1.phpt reflectionClass_isFinal_basic.phpt reflectionObject_export_basic2.phpt reflectionClass_hasConstant_basic.phpt reflectionClass_getExtension_basic.phpt reflectionClass_isIterateable_basic.phpt reflectionClass_export_basic2.phpt reflectionClass_hasProperty_basic.phpt reflectionObject_export_basic3.phpt reflectionClass_isAbstract_basic.phpt Log: Commit tests for ext/reflection http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt +++ php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_getExtensionName_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_getExtensionName_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_getExtensionName_basic.phpt --TEST-- ReflectionClass::getExtensionName() method - basic test for getExtensionName() method --SKIPIF-- ?php extension_loaded('reflection') extension_loaded('dom') or die('skip - reflection or dom extension not loaded'); ? --CREDITS-- Rein Velt [EMAIL PROTECTED] #testFest Roosendaal 2008-05-10 --FILE-- ?php $rc=new reflectionClass('domDocument'); var_dump( $rc-getExtensionName()) ; ? --EXPECT-- string(3) dom --UEXPECT-- unicode(3) dom http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt +++ php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt +++ php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt +++ php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt +++ php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection/tests reflectionClass_export_basic1.phpt reflectionClass_export_basic2.phpt reflectionObject___toString_basic1.phpt reflectionObject___toString_basic2.p
ant Mon Nov 17 12:26:43 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/reflection/tests reflectionObject_export_basic3.phpt reflectionClass_export_basic2.phpt reflectionClass_export_basic1.phpt reflectionObject___toString_basic1.phpt reflectionObject_export_basic2.phpt reflectionObject___toString_basic2.phpt reflectionObject_export_basic1.phpt reflectionProperty_constructor_variation1.phpt Log: Commit tests for ext/reflection http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt +++ php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_export_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_export_basic2.phpt +++ php-src/ext/reflection/tests/reflectionClass_export_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt +++ php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt +++ php-src/ext/reflection/tests/reflectionObject___toString_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject_export_basic2.phpt +++ php-src/ext/reflection/tests/reflectionObject_export_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt +++ php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt +++ php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt +++ php-src/ext/reflection/tests/reflectionProperty_constructor_variation1.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/reflection/tests reflectionClass_export_basic1.phpt reflectionClass_export_basic2.phpt reflectionObject___toString_basic1.phpt reflectionObject___toString_basic2.phpt refle
ant Mon Nov 17 12:50:18 2008 UTC Modified files: /php-src/ext/reflection/tests reflectionObject_export_basic3.phpt reflectionObject_export_basic1.phpt reflectionClass_export_basic1.phpt reflectionObject___toString_basic2.phpt reflectionObject_export_basic2.phpt reflectionObject___toString_basic1.phpt reflectionClass_export_basic2.phpt reflectionProperty_constructor_variation1.phpt Log: Commit tests for ext/reflection http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionObject_export_basic3.phpt:1.2 --- /dev/null Mon Nov 17 12:50:18 2008 +++ php-src/ext/reflection/tests/reflectionObject_export_basic3.phptMon Nov 17 12:50:18 2008 @@ -0,0 +1,38 @@ +--TEST-- +ReflectionObject::export() - ensure dynamic property with same name as inherited private property is shown. +--FILE-- +?php +class C { + private $p = 1; +} + +class D extends C{ +} + +$Obj = new D; +$Obj-p = 'value'; +ReflectionObject::export($Obj) +? +--EXPECTF-- +Object of class [ user class D extends C ] { + @@ %s 6-7 + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Dynamic properties [0] { + } + + - Methods [0] { + } +} + http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionObject_export_basic1.phpt:1.2 --- /dev/null Mon Nov 17 12:50:18 2008 +++ php-src/ext/reflection/tests/reflectionObject_export_basic1.phptMon Nov 17 12:50:18 2008 @@ -0,0 +1,36 @@ +--TEST-- +ReflectionObject::export() : very basic test with no dynamic properties +--FILE-- +?php + +class Foo { + public $bar = 1; +} +$f = new foo; + +ReflectionObject::export($f); + +? +--EXPECTF-- +Object of class [ user class Foo ] { + @@ %s 3-5 + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { +Property [ default public $bar ] + } + + - Dynamic properties [0] { + } + + - Methods [0] { + } +} \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt:1.2 --- /dev/null Mon Nov 17 12:50:18 2008 +++ php-src/ext/reflection/tests/reflectionClass_export_basic1.phpt Mon Nov 17 12:50:18 2008 @@ -0,0 +1,62 @@ +--TEST-- +ReflectionClass::export() - various parameters +--FILE-- +?php +Class A { + public function privf(Exception $a) {} + public function pubf(A $a, +$b, +C $c = null, +$d = K, +$e = 15 chars long -, +$f = null, +$g = false, +array $h = null) {} +} + +Class C extends A { } + +define('K', 16 chars long --); +ReflectionClass::export(C); +? +--EXPECTF-- +Class [ user class C extends A ] { + @@ %s 14-14 + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { +Method [ user, inherits A public method privf ] { + @@ %s 3 - 3 + + - Parameters [1] { +Parameter #0 [ required Exception $a ] + } +} + +Method [ user, inherits A public method pubf ] { + @@ %s 4 - 11 + + - Parameters [8] { +Parameter #0 [ required A $a ] +Parameter #1 [ required $b ] +Parameter #2 [ optional C or NULL $c = NULL ] +Parameter #3 [ optional $d = '16 chars long -...' ] +Parameter #4 [ optional $e = '15 chars long -' ] +Parameter #5 [ optional $f = NULL ] +Parameter #6 [ optional $g = false ] +Parameter #7 [ optional array or NULL $h = NULL ] + } +} + } +} \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionObject___toString_basic2.phpt diff -u /dev/null
[PHP-CVS] cvs: php-src / configure.in
dsp Mon Nov 17 15:12:33 2008 UTC Modified files: /php-srcconfigure.in Log: Feature request #46595. Use cc as default compiler and fallback to gcc. [DOC] http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.665r2=1.666diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.665 php-src/configure.in:1.666 --- php-src/configure.in:1.665 Thu Nov 6 20:38:02 2008 +++ php-src/configure.inMon Nov 17 15:12:33 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.665 2008/11/06 20:38:02 dsp Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.666 2008/11/17 15:12:33 dsp Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -140,7 +140,7 @@ dnl Checks for programs. dnl - -AC_PROG_CC +AC_PROG_CC([cc gcc]) PHP_DETECT_ICC PHP_DETECT_SUNCC AC_PROG_CC_C_O -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sqlite3 sqlite3.c
scottmacMon Nov 17 19:34:03 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sqlite3sqlite3.c Log: MFH Fix #46033 - Segfault when instantiating SQLite3stmt and SQLite3Result directly. http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.1.2.15r2=1.1.2.16diff_format=u Index: php-src/ext/sqlite3/sqlite3.c diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.15 php-src/ext/sqlite3/sqlite3.c:1.1.2.16 --- php-src/ext/sqlite3/sqlite3.c:1.1.2.15 Mon Nov 17 11:27:59 2008 +++ php-src/ext/sqlite3/sqlite3.c Mon Nov 17 19:34:03 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite3.c,v 1.1.2.15 2008/11/17 11:27:59 felipe Exp $ */ +/* $Id: sqlite3.c,v 1.1.2.16 2008/11/17 19:34:03 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -512,7 +512,7 @@ } /* }}} */ -/* {{{ proto SQLite3Result SQLite3::querySingle(String Query [, entire_row = false]) +/* {{{ proto SQLite3Result SQLite3::querySingle(String Query [, bool entire_row = false]) Returns a string of the first column, or an array of the entire row. */ PHP_METHOD(sqlite3, querySingle) { @@ -1063,6 +1063,8 @@ return; } + SQLITE3_CHECK_INITIALIZED(stmt_obj-initialised, SQLite3) + if (stmt_obj-bound_params) { zend_hash_internal_pointer_reset(stmt_obj-bound_params); while (zend_hash_get_current_data(stmt_obj-bound_params, (void **)param) == SUCCESS) { @@ -1167,6 +1169,47 @@ } /* }}} */ +/* {{{ proto int SQLite3Stmt::__construct(SQLite3 dbobject, String Statement) + __constructor for SQLite3Stmt. */ +PHP_METHOD(sqlite3stmt, __construct) +{ + php_sqlite3_stmt *stmt_obj; + php_sqlite3_db_object *db_obj; + zval *object = getThis(); + zval *db_zval; + stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC); + char *sql; + int sql_len, errcode; + + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Os, db_zval, php_sqlite3_sc_entry, sql, sql_len) == FAILURE) { + return; + } + + db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(db_zval TSRMLS_CC); + + SQLITE3_CHECK_INITIALIZED(db_obj-initialised, SQLite3) + + if (!sql_len) { + RETURN_FALSE; + } + + stmt_obj-db_obj = db_obj; + stmt_obj-db_obj_zval = db_zval; + + Z_ADDREF_P(db_zval); + + errcode = sqlite3_prepare_v2(db_obj-db, sql, sql_len, (stmt_obj-stmt), NULL); + if (errcode != SQLITE_OK) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to prepare statement: %d, %s, errcode, sqlite3_errmsg(db_obj-db)); + zval_dtor(return_value); + RETURN_FALSE; + } + stmt_obj-initialised = 1; +} +/* }}} */ + /* {{{ proto int SQLite3Result::numColumns() Number of columns in the result set. */ PHP_METHOD(sqlite3result, numColumns) @@ -1327,6 +1370,21 @@ } /* }}} */ +/* {{{ proto int SQLite3Result::__construct() + __constructor for SQLite3Result. */ +PHP_METHOD(sqlite3result, __construct) +{ + php_sqlite3_result *result_obj; + zval *object = getThis(); + result_obj = (php_sqlite3_result *)zend_object_store_get_object(object TSRMLS_CC); + + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); + + php_error_docref(NULL TSRMLS_CC, E_WARNING, SQLite3Result cannot be directly instantiated); + +} +/* }}} */ + /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_open, 0) ZEND_ARG_INFO(0, filename) @@ -1417,6 +1475,10 @@ ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(arginfo_sqlite3stmt_construct, 1) + ZEND_ARG_INFO(0, sqlite3) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_sqlite3result_numcolumns, 0) ZEND_END_ARG_INFO() @@ -1437,6 +1499,9 @@ ZEND_BEGIN_ARG_INFO(arginfo_sqlite3result_finalize, 0) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_sqlite3result_construct, 0) +ZEND_END_ARG_INFO() /* }}} */ /* {{{ php_sqlite3_class_methods */ @@ -1457,7 +1522,7 @@ PHP_ME(sqlite3, createFunction, arginfo_sqlite3_createfunction, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, createAggregate, arginfo_sqlite3_createaggregate, ZEND_ACC_PUBLIC) /* Aliases */ - PHP_MALIAS(sqlite3, __construct, open, arginfo_sqlite3_open, ZEND_ACC_PUBLIC) + PHP_MALIAS(sqlite3, __construct, open, arginfo_sqlite3_open, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) {NULL, NULL, NULL} }; /* }}} */ @@ -1471,6 +1536,7 @@ PHP_ME(sqlite3stmt, execute,arginfo_sqlite3stmt_execute, ZEND_ACC_PUBLIC) PHP_ME(sqlite3stmt, bindParam, arginfo_sqlite3stmt_bindparam, ZEND_ACC_PUBLIC) PHP_ME(sqlite3stmt, bindValue,
[PHP-CVS] cvs: php-src /ext/openssl openssl.c /ext/openssl/tests openssl_random_pseudo_bytes.phpt
scottmacMon Nov 17 21:54:20 2008 UTC Added files: /php-src/ext/openssl/tests openssl_random_pseudo_bytes.phpt Modified files: /php-src/ext/opensslopenssl.c Log: Add openssl_random_pseudo_bytes() in order to expose access to a PRG, this wraps around whatever the OS provides. - OpenBSD uses arc4random() - Windows uses the Windows Crypto API - FreeBSD, Linux, etc use /dev/random or /dev/urandom if available [DOC] http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.175r2=1.176diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.175 php-src/ext/openssl/openssl.c:1.176 --- php-src/ext/openssl/openssl.c:1.175 Mon Nov 17 11:26:22 2008 +++ php-src/ext/openssl/openssl.c Mon Nov 17 21:54:20 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.175 2008/11/17 11:26:22 felipe Exp $ */ +/* $Id: openssl.c,v 1.176 2008/11/17 21:54:20 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -91,6 +91,7 @@ PHP_FUNCTION(openssl_decrypt); PHP_FUNCTION(openssl_dh_compute_key); +PHP_FUNCTION(openssl_random_pseudo_bytes); /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 0, 2) @@ -349,6 +350,11 @@ ZEND_ARG_INFO(0, pub_key) ZEND_ARG_INFO(0, dh_key) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_random_pseudo_bytes, 0, 0, 1) +ZEND_ARG_INFO(0, length) +ZEND_ARG_INFO(1, returned_strong_result) +ZEND_END_ARG_INFO() /* }}} */ /* {{{ openssl_functions[] @@ -413,6 +419,7 @@ PHP_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key) + PHP_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes) PHP_FE(openssl_error_string, arginfo_openssl_error_string) {NULL, NULL, NULL} }; @@ -4968,6 +4975,52 @@ } /* }}} */ +/* {{{ proto string openssl_random_pseudo_bytes(integer length [, bool returned_strong_result]) U + Returns a string of the length specified filled with random pseudo bytes */ +PHP_FUNCTION(openssl_random_pseudo_bytes) +{ + long buffer_length; + unsigned char *buffer = NULL; + zval *zstrong_result_returned = NULL; + int strong_result = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|z, buffer_length, zstrong_result_returned) == FAILURE) { + return; + } + + if (buffer_length = 0) { + RETURN_FALSE; + } + + if (zstrong_result_returned) { + zval_dtor(zstrong_result_returned); + ZVAL_BOOL(zstrong_result_returned, 0); + } + + buffer = emalloc(buffer_length); + + if (!buffer) { + RETURN_FALSE; + } + +#ifdef WINDOWS +RAND_screen(); +#endif + + if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length)) 0) { + RETVAL_FALSE; + } else { + RETVAL_STRINGL((char *)buffer, buffer_length, 1); + + if (zstrong_result_returned) { + ZVAL_BOOL(zstrong_result_returned, strong_result); + } + + } + efree(buffer); +} +/* }}} */ + /* * Local variables: * tab-width: 8 http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/openssl_random_pseudo_bytes.phpt?view=markuprev=1.1 Index: php-src/ext/openssl/tests/openssl_random_pseudo_bytes.phpt +++ php-src/ext/openssl/tests/openssl_random_pseudo_bytes.phpt --TEST-- openssl_random_pseudo_bytes() tests --SKIPIF-- ?php if (!extension_loaded(openssl)) print skip; ? --FILE-- ?php for ($i = 0; $i 10; $i++) { var_dump(bin2hex(openssl_random_pseudo_bytes($i, $strong))); } ? --EXPECTF-- unicode(0) unicode(2) %s unicode(4) %s unicode(6) %s unicode(8) %s unicode(10) %s unicode(12) %s unicode(14) %s unicode(16) %s unicode(18) %s -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/openssl openssl.c
scottmacMon Nov 17 21:54:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/opensslopenssl.c Log: MFH Add openssl_random_pseudo_bytes() in order to expose access to a PRG, this wraps around whatever the OS provides. - OpenBSD uses arc4random() - Windows uses the Windows Crypto API - FreeBSD, Linux, etc use /dev/random or /dev/urandom if available [DOC] http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.41.2.24r2=1.98.2.5.2.41.2.25diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.24 php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.25 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.24Mon Nov 17 11:27:57 2008 +++ php-src/ext/openssl/openssl.c Mon Nov 17 21:54:25 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98.2.5.2.41.2.24 2008/11/17 11:27:57 felipe Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.41.2.25 2008/11/17 21:54:25 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -94,6 +94,7 @@ PHP_FUNCTION(openssl_decrypt); PHP_FUNCTION(openssl_dh_compute_key); +PHP_FUNCTION(openssl_random_pseudo_bytes); /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 0, 2) @@ -352,6 +353,11 @@ ZEND_ARG_INFO(0, pub_key) ZEND_ARG_INFO(0, dh_key) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_random_pseudo_bytes, 0, 0, 1) +ZEND_ARG_INFO(0, length) +ZEND_ARG_INFO(1, result_is_strong) +ZEND_END_ARG_INFO() /* }}} */ /* {{{ openssl_functions[] @@ -416,6 +422,7 @@ PHP_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key) + PHP_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes) PHP_FE(openssl_error_string, arginfo_openssl_error_string) {NULL, NULL, NULL} }; @@ -4704,6 +4711,52 @@ } /* }}} */ +/* {{{ proto string openssl_random_pseudo_bytes(integer length [, bool returned_strong_result]) + Returns a string of the length specified filled with random pseudo bytes */ +PHP_FUNCTION(openssl_random_pseudo_bytes) +{ + long buffer_length; + unsigned char *buffer = NULL; + zval *zstrong_result_returned = NULL; + int strong_result = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|z, buffer_length, zstrong_result_returned) == FAILURE) { + return; + } + + if (buffer_length = 0) { + RETURN_FALSE; + } + + if (zstrong_result_returned) { + zval_dtor(zstrong_result_returned); + ZVAL_BOOL(zstrong_result_returned, 0); + } + + buffer = emalloc(buffer_length); + + if (!buffer) { + RETURN_FALSE; + } + +#ifdef WINDOWS +RAND_screen(); +#endif + + if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length)) 0) { + RETVAL_FALSE; + } else { + RETVAL_STRINGL((char *)buffer, buffer_length, 1); + + if (zstrong_result_returned) { + ZVAL_BOOL(zstrong_result_returned, strong_result); + } + + } + efree(buffer); +} +/* }}} */ + /* * Local variables: * tab-width: 8 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
iliaa Mon Nov 17 23:40:54 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: More detailed bug fix description http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1316r2=1.2027.2.547.2.1317diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1316 php-src/NEWS:1.2027.2.547.2.1317 --- php-src/NEWS:1.2027.2.547.2.1316Sun Nov 16 18:01:25 2008 +++ php-src/NEWSMon Nov 17 23:40:54 2008 @@ -14,7 +14,7 @@ - Fixed bug #46521 (Curl ZTS OpenSSL, error in config.m4 fragment). (jd at cpanel dot net) - Fixed bug #44818 (php://memory writeable when opened read only). (Arnaud) -- Fixed bug #30312 (sybase_unbuffered_query calls). (Timm) +- Fixed bug #30312 (crash in sybase_unbuffered_query() function). (Timm) - Fixed stream_get_contents() when using $maxlength and socket is not closed. [EMAIL PROTECTED] on #46049. (Arnaud) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/openssl openssl.c /ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem
pajoye Tue Nov 18 01:56:12 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem Modified files: /php-src/ext/opensslopenssl.c Log: - #41033, enable signing with DSA keys http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.41.2.25r2=1.98.2.5.2.41.2.26diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.25 php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.26 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.25Mon Nov 17 21:54:25 2008 +++ php-src/ext/openssl/openssl.c Tue Nov 18 01:56:12 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98.2.5.2.41.2.25 2008/11/17 21:54:25 scottmac Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.41.2.26 2008/11/18 01:56:12 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -58,6 +58,7 @@ #define OPENSSL_ALGO_MD5 2 #define OPENSSL_ALGO_MD4 3 #define OPENSSL_ALGO_MD2 4 +#define OPENSSL_ALGO_DSS1 5 #define DEBUG_SMIME0 @@ -904,6 +905,9 @@ case OPENSSL_ALGO_MD2: mdtype = (EVP_MD *) EVP_md2(); break; + case OPENSSL_ALGO_DSS1: + mdtype = (EVP_MD *) EVP_dss1(); + break; default: return NULL; break; @@ -983,6 +987,7 @@ REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD5, OPENSSL_ALGO_MD5, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD4, OPENSSL_ALGO_MD4, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD2, OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(OPENSSL_ALGO_DSS1, OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT); /* flags for S/MIME */ REGISTER_LONG_CONSTANT(PKCS7_DETACHED, PKCS7_DETACHED, CONST_CS|CONST_PERSISTENT); @@ -1470,7 +1475,6 @@ return 0; } X509_STORE_CTX_init(csc, ctx, x, untrustedchain); - if(purpose = 0) { X509_STORE_CTX_set_purpose(csc, purpose); } http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.pem?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033.pem +++ php-src/ext/openssl/tests/bug41033.pem http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.phpt?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033.phpt +++ php-src/ext/openssl/tests/bug41033.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033pub.pem?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033pub.pem +++ php-src/ext/openssl/tests/bug41033pub.pem -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl openssl.c /ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem
pajoye Tue Nov 18 02:02:19 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem Modified files: /php-src/ext/opensslopenssl.c Log: - MFH: #41033, enable signing with DSA keys http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.48r2=1.98.2.5.2.49diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.48 php-src/ext/openssl/openssl.c:1.98.2.5.2.49 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.48 Sun Oct 26 14:35:59 2008 +++ php-src/ext/openssl/openssl.c Tue Nov 18 02:02:19 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98.2.5.2.48 2008/10/26 14:35:59 iliaa Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.49 2008/11/18 02:02:19 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -56,6 +56,7 @@ #define OPENSSL_ALGO_MD5 2 #define OPENSSL_ALGO_MD4 3 #define OPENSSL_ALGO_MD2 4 +#define OPENSSL_ALGO_DSS1 5 #define DEBUG_SMIME0 @@ -641,6 +642,9 @@ case OPENSSL_ALGO_MD2: mdtype = (EVP_MD *) EVP_md2(); break; + case OPENSSL_ALGO_DSS1: + mdtype = (EVP_MD *) EVP_dss1(); + break; default: return NULL; break; @@ -692,6 +696,7 @@ REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD5, OPENSSL_ALGO_MD5, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD4, OPENSSL_ALGO_MD4, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD2, OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(OPENSSL_ALGO_DSS1, OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT); /* flags for S/MIME */ REGISTER_LONG_CONSTANT(PKCS7_DETACHED, PKCS7_DETACHED, CONST_CS|CONST_PERSISTENT); @@ -1200,7 +1205,7 @@ STACK_OF(X509) * untrustedchain = NULL; long purpose; char * untrusted = NULL; - int untrusted_len; + int untrusted_len, ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Zl|a!s, zcert, purpose, zcainfo, untrusted, untrusted_len) == FAILURE) { @@ -1224,7 +1229,15 @@ if (cert == NULL) { goto clean_exit; } - RETVAL_LONG(check_cert(cainfo, cert, untrustedchain, purpose)); + + ret = check_cert(cainfo, cert, untrustedchain, purpose); + +if (ret != 0 ret != 1) { +RETVAL_LONG(ret); +} else { +RETVAL_BOOL(ret); +} + clean_exit: if (certresource == 1 cert) { http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.pem?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033.pem +++ php-src/ext/openssl/tests/bug41033.pem http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.phpt?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033.phpt +++ php-src/ext/openssl/tests/bug41033.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033pub.pem?view=markuprev=1.1 Index: php-src/ext/openssl/tests/bug41033pub.pem +++ php-src/ext/openssl/tests/bug41033pub.pem -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl/tests bug46127.phpt
pajoye Tue Nov 18 02:03:19 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/openssl/tests bug46127.phpt Log: - fix title http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug46127.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/openssl/tests/bug46127.phpt diff -u php-src/ext/openssl/tests/bug46127.phpt:1.1.2.3 php-src/ext/openssl/tests/bug46127.phpt:1.1.2.4 --- php-src/ext/openssl/tests/bug46127.phpt:1.1.2.3 Sun Nov 16 23:19:33 2008 +++ php-src/ext/openssl/tests/bug46127.phpt Tue Nov 18 02:03:19 2008 @@ -1,5 +1,5 @@ --TEST-- -openssl_sign/verify: accept different algos +#46127, openssl_sign/verify: accept different algos --SKIPIF-- ?php if (!extension_loaded(openssl)) die(skip, openssl required); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/openssl/tests bug46127.phpt
pajoye Tue Nov 18 02:03:38 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/openssl/tests bug46127.phpt Log: - MFB: fix title http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug46127.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/openssl/tests/bug46127.phpt diff -u php-src/ext/openssl/tests/bug46127.phpt:1.1.4.3 php-src/ext/openssl/tests/bug46127.phpt:1.1.4.4 --- php-src/ext/openssl/tests/bug46127.phpt:1.1.4.3 Sun Nov 16 23:22:43 2008 +++ php-src/ext/openssl/tests/bug46127.phpt Tue Nov 18 02:03:38 2008 @@ -1,5 +1,5 @@ --TEST-- -openssl_sign/verify: accept different algos +#46127, openssl_sign/verify: accept different algos --SKIPIF-- ?php if (!extension_loaded(openssl)) die(skip, openssl required); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/openssl openssl.c /ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem
pajoye Tue Nov 18 02:12:48 2008 UTC Modified files: /php-src/ext/opensslopenssl.c /php-src/ext/openssl/tests bug41033.pem bug41033.phpt bug41033pub.pem Log: - MFB: #41033, enable signing with DSA keys http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.176r2=1.177diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.176 php-src/ext/openssl/openssl.c:1.177 --- php-src/ext/openssl/openssl.c:1.176 Mon Nov 17 21:54:20 2008 +++ php-src/ext/openssl/openssl.c Tue Nov 18 02:12:47 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.176 2008/11/17 21:54:20 scottmac Exp $ */ +/* $Id: openssl.c,v 1.177 2008/11/18 02:12:47 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -55,7 +55,7 @@ #define OPENSSL_ALGO_MD5 2 #define OPENSSL_ALGO_MD4 3 #define OPENSSL_ALGO_MD2 4 - +#define OPENSSL_ALGO_DSS1 5 #define DEBUG_SMIME0 /* FIXME: Use the openssl constants instead of @@ -904,6 +904,9 @@ case OPENSSL_ALGO_MD2: mdtype = (EVP_MD *) EVP_md2(); break; + case OPENSSL_ALGO_DSS1: + mdtype = (EVP_MD *) EVP_dss1(); + break; default: return NULL; break; @@ -983,6 +986,7 @@ REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD5, OPENSSL_ALGO_MD5, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD4, OPENSSL_ALGO_MD4, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_ALGO_MD2, OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(OPENSSL_ALGO_DSS1, OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT); /* flags for S/MIME */ REGISTER_LONG_CONSTANT(PKCS7_DETACHED, PKCS7_DETACHED, CONST_CS|CONST_PERSISTENT); http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.pem?r1=1.1r2=1.2diff_format=u Index: php-src/ext/openssl/tests/bug41033.pem diff -u /dev/null php-src/ext/openssl/tests/bug41033.pem:1.2 --- /dev/null Tue Nov 18 02:12:48 2008 +++ php-src/ext/openssl/tests/bug41033.pem Tue Nov 18 02:12:48 2008 @@ -0,0 +1,12 @@ +-BEGIN DSA PRIVATE KEY- +MIIBuwIBAAKBgQCrQ/By/Y5OQRmmc/e+W+eFVoeR5y8WPOkykwS2hc21aSNY5X3q +8ZHdV467thFd/QCoR55hHTRGRbYmfOkXSiscotU08ISlxIH39EEhFSzwqzkxFfak +cgHEu41AUOIfJ2Dz+vcmuasME159pDP0d0gt55pKRPcXoh916p2VS/FBiQIVAMnQ +C6W+K1brelHqpUqwQ1cdNJklAoGAN858gG/UIF+U3CYTcgl5/OUAqOzvitMV2ue+ +AkDEkGNEZs3KUAjpqHduf1E3znl7hJJIRr+33sul9USxn0vczDBkEJPralQjNX2C +dnYKDDhJ+UKlAFG2JZint4CBKPFiZC0tVo04iDQQUUfDC4c8K3cS5uzypebJyoLo +e5b8rScCgYBedJg6vklhMWv2wZD10hbQaXEX5r8T6EQujbfO0RcKpuaJziPPrXO8 +QwPtLt0f40yjTmPxN3LcpgMymiun9UCSTZ3MhVKekCmSNzs5+lQpCm1VlDrCg+jn +djw0VCX8Cm0lOPIyQ4eCNAB6nQLtBnXFWaqYuUS8iVDE7wmT0iwnkAIVAMKogWVA +ZOKwjTj9Yztv3lGj7VTa +-END DSA PRIVATE KEY- http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/openssl/tests/bug41033.phpt diff -u /dev/null php-src/ext/openssl/tests/bug41033.phpt:1.2 --- /dev/null Tue Nov 18 02:12:48 2008 +++ php-src/ext/openssl/tests/bug41033.phpt Tue Nov 18 02:12:48 2008 @@ -0,0 +1,27 @@ +--TEST-- +#41033, enable signing with DSA keys +--SKIPIF-- +?php +if (!extension_loaded(openssl)) die(skip, openssl required); +if (OPENSSL_VERSION_NUMBER 0x009070af) die(skip); +? +--FILE-- +?php +$prv = 'file://' . dirname(__FILE__) . '/' . 'bug41033.pem'; +$pub = 'file://' . dirname(__FILE__) . '/' . 'bug41033pub.pem'; + + +$prkeyid = openssl_get_privatekey($prv, 1234); +$ct = bHello I am some text!; +openssl_sign($ct, $signature, $prkeyid, OPENSSL_ALGO_DSS1); +echo Signature: .base64_encode($signature) . \n; + +$pukeyid = openssl_get_publickey($pub); +$valid = openssl_verify($ct, $signature, $pukeyid, OPENSSL_ALGO_DSS1); +echo Signature validity: . $valid . \n; + + +? +--EXPECTF-- +Signature: %s +Signature validity: 1 http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/bug41033pub.pem?r1=1.1r2=1.2diff_format=u Index: php-src/ext/openssl/tests/bug41033pub.pem diff -u /dev/null php-src/ext/openssl/tests/bug41033pub.pem:1.2 --- /dev/null Tue Nov 18 02:12:48 2008 +++ php-src/ext/openssl/tests/bug41033pub.pem Tue Nov 18 02:12:48 2008 @@ -0,0 +1,12 @@ +-BEGIN PUBLIC KEY- +MIIBtjCCASsGByqGSM44BAEwggEeAoGBAKtD8HL9jk5BGaZz975b54VWh5HnLxY8 +6TKTBLaFzbVpI1jlferxkd1Xjru2EV39AKhHnmEdNEZFtiZ86RdKKxyi1TTwhKXE +gff0QSEVLPCrOTEV9qRyAcS7jUBQ4h8nYPP69ya5qwwTXn2kM/R3SC3nmkpE9xei +H3XqnZVL8UGJAhUAydALpb4rVut6UeqlSrBDVx00mSUCgYA3znyAb9QgX5TcJhNy +CXn85QCo7O+K0xXa574CQMSQY0RmzcpQCOmod25/UTfOeXuEkkhGv7fey6X1RLGf +S9zMMGQQk+tqVCM1fYJ2dgoMOEn5QqUAUbYlmKe3gIEo8WJkLS1WjTiINBBRR8ML +hzwrdxLm7PKl5snKguh7lvytJwOBhAACgYBedJg6vklhMWv2wZD10hbQaXEX5r8T