Re: [PHP-CVS] svn: /php/php-src/trunk/Zend/tests/ constants_005.phpt

2011-05-20 Thread Hannes Magnusson
On Wed, May 18, 2011 at 22:07, Jeraimee Hughes jerai...@php.net wrote:
 jeraimee                                 Wed, 18 May 2011 20:07:11 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=311204

 Log:
 Fixed failing test.

 Changed paths:
    U   php/php-src/trunk/Zend/tests/constants_005.phpt

 Modified: php/php-src/trunk/Zend/tests/constants_005.phpt
 ===
 --- php/php-src/trunk/Zend/tests/constants_005.phpt     2011-05-18 19:55:34 
 UTC (rev 311203)
 +++ php/php-src/trunk/Zend/tests/constants_005.phpt     2011-05-18 20:07:11 
 UTC (rev 311204)
 @@ -7,5 +7,6 @@
  var_dump(ZEND_THREAD_safe);
  ?
  --EXPECTF--
 -bool(%s)
 +Notice: Use of undefined constant ZEND_THREAD_safe - assumed 
 'ZEND_THREAD_safe' in %s on line %d
 +string(16) ZEND_THREAD_safe
  int(123)


This isn't expected behavior, and Scott committed a proper fix for it,
so please revert :)

-Hannes

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



Re: [PHP-CVS] svn: /php/php-src/trunk/Zend/tests/ constants_005.phpt

2011-05-20 Thread Hannes Magnusson
On Fri, May 20, 2011 at 12:40, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Wed, May 18, 2011 at 22:07, Jeraimee Hughes jerai...@php.net wrote:
 jeraimee                                 Wed, 18 May 2011 20:07:11 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=311204

 Log:
 Fixed failing test.

 Changed paths:
    U   php/php-src/trunk/Zend/tests/constants_005.phpt

 Modified: php/php-src/trunk/Zend/tests/constants_005.phpt
 ===
 --- php/php-src/trunk/Zend/tests/constants_005.phpt     2011-05-18 19:55:34 
 UTC (rev 311203)
 +++ php/php-src/trunk/Zend/tests/constants_005.phpt     2011-05-18 20:07:11 
 UTC (rev 311204)
 @@ -7,5 +7,6 @@
  var_dump(ZEND_THREAD_safe);
  ?
  --EXPECTF--
 -bool(%s)
 +Notice: Use of undefined constant ZEND_THREAD_safe - assumed 
 'ZEND_THREAD_safe' in %s on line %d
 +string(16) ZEND_THREAD_safe
  int(123)


 This isn't expected behavior, and Scott committed a proper fix for it,
 so please revert :)


Actually. It was the otherway around. *sigh* sorry :)

-Hannes

--
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/NEWS branches/PHP_5_4/UPGRADING branches/PHP_5_4/ext/openssl/openssl.c branches/PHP_5_4/ext/openssl/php_openssl.h branches/PHP_5_4/ext/openssl/tests/011.p

2011-05-20 Thread Scott MacVicar
scottmac Fri, 20 May 2011 18:56:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311299

Log:
Allow management of your own padding in openssl_encrypt/decrypt.

For using mcrypt / openssl interchangeabley managing your own padding is the 
only solution.

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/UPGRADING
U   php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
U   php/php-src/branches/PHP_5_4/ext/openssl/php_openssl.h
U   php/php-src/branches/PHP_5_4/ext/openssl/tests/011.phpt
U   php/php-src/branches/PHP_5_4/ext/openssl/tests/bug54060.phpt
U   php/php-src/branches/PHP_5_4/ext/openssl/tests/bug54061.phpt
U   
php/php-src/branches/PHP_5_4/ext/openssl/tests/openssl_decrypt_error.phpt
U   php/php-src/trunk/ext/openssl/openssl.c
U   php/php-src/trunk/ext/openssl/php_openssl.h
U   php/php-src/trunk/ext/openssl/tests/011.phpt
U   php/php-src/trunk/ext/openssl/tests/bug54060.phpt
U   php/php-src/trunk/ext/openssl/tests/bug54061.phpt
U   php/php-src/trunk/ext/openssl/tests/openssl_decrypt_error.phpt

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS	2011-05-20 18:07:34 UTC (rev 311298)
+++ php/php-src/branches/PHP_5_4/NEWS	2011-05-20 18:56:13 UTC (rev 311299)
@@ -178,6 +178,7 @@
   . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre)
   . Added a no_ticket SSL context option to disable the SessionTicket TLS
 extension. FR #53447. (Adam)
+  . Added no padding option to openssl_encrypt()/openssl_decrypt(). (Scott)

 - Improved PDO DB-LIB: (Stanley)
   . Added nextRowset support.

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING	2011-05-20 18:07:34 UTC (rev 311298)
+++ php/php-src/branches/PHP_5_4/UPGRADING	2011-05-20 18:56:13 UTC (rev 311299)
@@ -174,6 +174,8 @@
   just the first matching node.
 - All SimpleXMLElement children are now always printed when using var_dump(),
   var_export(), and print_r().
+- The raw data parameter in openssl_encrypt()/openssl_decrypt() is now an options
+  integer rather than a boolean. A value of true produces the same behaviour.

 ===
 5. Changes made to existing methods
@@ -392,6 +394,8 @@
- IPV6_MULTICAST_LOOP
- IPPROTO_IP
- IPPROTO_IPV6
+   - OPENSSL_RAW_DATA
+   - OPENSSL_ZERO_PADDING

  g. New classes


Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c	2011-05-20 18:07:34 UTC (rev 311298)
+++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c	2011-05-20 18:56:13 UTC (rev 311299)
@@ -350,7 +350,7 @@
 ZEND_ARG_INFO(0, data)
 ZEND_ARG_INFO(0, method)
 ZEND_ARG_INFO(0, password)
-ZEND_ARG_INFO(0, raw_output)
+ZEND_ARG_INFO(0, options)
 ZEND_ARG_INFO(0, iv)
 ZEND_END_ARG_INFO()

@@ -358,7 +358,7 @@
 ZEND_ARG_INFO(0, data)
 ZEND_ARG_INFO(0, method)
 ZEND_ARG_INFO(0, password)
-ZEND_ARG_INFO(0, raw_input)
+ZEND_ARG_INFO(0, options)
 ZEND_ARG_INFO(0, iv)
 ZEND_END_ARG_INFO()

@@ -1089,6 +1089,9 @@
 	REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_EC, OPENSSL_KEYTYPE_EC, CONST_CS|CONST_PERSISTENT);
 #endif

+	REGISTER_LONG_CONSTANT(OPENSSL_RAW_DATA, OPENSSL_RAW_DATA, CONST_CS|CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT(OPENSSL_ZERO_PADDING, OPENSSL_ZERO_PADDING, CONST_CS|CONST_PERSISTENT);
+
 #if OPENSSL_VERSION_NUMBER = 0x0090806fL  !defined(OPENSSL_NO_TLSEXT)
 	/* SNI support included in OpenSSL = 0.9.8j */
 	REGISTER_LONG_CONSTANT(OPENSSL_TLSEXT_SERVER_NAME, 1, CONST_CS|CONST_PERSISTENT);
@@ -4679,11 +4682,11 @@

 }

-/* {{{ proto string openssl_encrypt(string data, string method, string password [, bool raw_output=false [, string $iv='']])
+/* {{{ proto string openssl_encrypt(string data, string method, string password [, long options=0 [, string $iv='']])
Encrypts given data with given method and key, returns raw or base64 encoded string */
 PHP_FUNCTION(openssl_encrypt)
 {
-	zend_bool raw_output = 0;
+	long options = 0;
 	char *data, *method, *password, *iv = ;
 	int data_len, method_len, password_len, iv_len = 0, max_iv_len;
 	const EVP_CIPHER *cipher_type;
@@ -4692,7 +4695,7 @@
 	unsigned char *outbuf, *key;
 	zend_bool free_iv;

-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sss|bs, data, data_len, method, method_len, password, password_len, raw_output, iv, iv_len) == FAILURE) {
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sss|ls, data, data_len, method, method_len, password, password_len, options, iv, iv_len) == FAILURE) {
 		return;
 	}
 	cipher_type = EVP_get_cipherbyname(method);
@@ -4720,11 +4723,14 @@
 	outbuf = emalloc(outlen + 1);

 	

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/php_crypt_r.c branches/PHP_5_4/ext/standard/php_crypt_r.c trunk/ext/standard/php_crypt_r.c

2011-05-20 Thread Felipe Pena
felipe   Fri, 20 May 2011 21:24:51 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311300

Log:
- Fixed bug #54895 (Fix compiling with older gcc version without need for 
membar_producer macro)
  patch by: mhei at heimpold dot de

Bug: http://bugs.php.net/54895 (Open) Fix compiling with older gcc version 
without need for membar_producer macro
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
U   php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c
U   php/php-src/trunk/ext/standard/php_crypt_r.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-20 18:56:13 UTC (rev 311299)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-20 21:24:51 UTC (rev 311300)
@@ -24,6 +24,8 @@
   . Implemented FR #54459 (Range function accuracy). (Adam)
   . Added PHP_MANDIR constant telling where the manpages were installed into,
 and an --man-dir argument to php-config. (Hannes)
+  . Fixed bug #54895 (Fix compiling with older gcc version without need for
+membar_producer macro). (mhei at heimpold dot de)
   . Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
 (Scott)
   . Fixed bug #54580 (get_browser() segmentation fault when browscap ini

Modified: php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2011-05-20 
18:56:13 UTC (rev 311299)
+++ php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2011-05-20 
21:24:51 UTC (rev 311300)
@@ -94,7 +94,7 @@
if (!initialized) {
 #ifdef PHP_WIN32
InterlockedIncrement(initialized);
-#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 2))
+#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 1))
__sync_fetch_and_add(initialized, 1);
 #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
membar_producer();

Modified: php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c 2011-05-20 
18:56:13 UTC (rev 311299)
+++ php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c 2011-05-20 
21:24:51 UTC (rev 311300)
@@ -94,7 +94,7 @@
if (!initialized) {
 #ifdef PHP_WIN32
InterlockedIncrement(initialized);
-#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 2))
+#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 1))
__sync_fetch_and_add(initialized, 1);
 #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
membar_producer();

Modified: php/php-src/trunk/ext/standard/php_crypt_r.c
===
--- php/php-src/trunk/ext/standard/php_crypt_r.c2011-05-20 18:56:13 UTC 
(rev 311299)
+++ php/php-src/trunk/ext/standard/php_crypt_r.c2011-05-20 21:24:51 UTC 
(rev 311300)
@@ -94,7 +94,7 @@
if (!initialized) {
 #ifdef PHP_WIN32
InterlockedIncrement(initialized);
-#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 2))
+#elif (defined(__GNUC__)  (__GNUC__ = 4  __GNUC_MINOR__ = 1))
__sync_fetch_and_add(initialized, 1);
 #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
membar_producer();

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