cellog          Sun Aug 31 06:13:42 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/phar   phar.c phar.phar 
  Log:
  remove orphaned code, merge from pecl/phar
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.41&r2=1.370.2.42&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.41 php-src/ext/phar/phar.c:1.370.2.42
--- php-src/ext/phar/phar.c:1.370.2.41  Sun Aug 31 06:09:37 2008
+++ php-src/ext/phar/phar.c     Sun Aug 31 06:13:42 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar.c,v 1.370.2.41 2008/08/31 06:09:37 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.42 2008/08/31 06:13:42 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -2514,125 +2514,6 @@
 }
 /* }}} */
 
-#ifndef PHAR_HAVE_OPENSSL
-static int phar_call_openssl_signverify(int is_sign, php_stream *fp, off_t 
end, char *key, int key_len, char **signature, int *signature_len TSRMLS_DC) /* 
{{{ */
-{
-       zend_fcall_info fci;
-       zend_fcall_info_cache fcc;
-       zval *zdata, *zsig, *zkey, *retval_ptr, **zp[3], *openssl;
-
-       MAKE_STD_ZVAL(zdata);
-       MAKE_STD_ZVAL(openssl);
-       ZVAL_STRINGL(openssl, is_sign ? "openssl_sign" : "openssl_verify", 
is_sign ? sizeof("openssl_sign")-1 : sizeof("openssl_verify")-1, 1);
-       MAKE_STD_ZVAL(zsig);
-       ZVAL_STRINGL(zsig, *signature, *signature_len, 1);
-       MAKE_STD_ZVAL(zkey);
-       ZVAL_STRINGL(zkey, key, key_len, 1);
-       zp[0] = &zdata;
-       zp[1] = &zsig;
-       zp[2] = &zkey;
-
-       php_stream_rewind(fp);
-       Z_TYPE_P(zdata) = IS_STRING;
-       Z_STRLEN_P(zdata) = end;
-       if (end != (off_t) php_stream_copy_to_mem(fp, &(Z_STRVAL_P(zdata)), 
(size_t) end, 0)) {
-               zval_dtor(zdata);
-               zval_dtor(zsig);
-               zval_dtor(zkey);
-               return FAILURE;
-       }
-
-#if PHP_VERSION_ID < 50300
-       if (FAILURE == zend_fcall_info_init(openssl, &fci, &fcc TSRMLS_CC)) {
-#else
-       if (FAILURE == zend_fcall_info_init(openssl, 0, &fci, &fcc, NULL, NULL 
TSRMLS_CC)) {
-#endif
-               zval_dtor(zdata);
-               zval_dtor(zsig);
-               zval_dtor(zkey);
-               zval_dtor(openssl);
-               return FAILURE;
-       }
-
-       zval_dtor(openssl);
-       efree(openssl);
-
-       fci.param_count = 3;
-       fci.params = zp;
-#if PHP_VERSION_ID < 50300
-       ++(zdata->refcount);
-       ++(zsig->refcount);
-       ++(zkey->refcount);
-#else
-       Z_ADDREF_P(zdata);
-
-       if (is_sign) {
-               Z_SET_ISREF_P(zsig);
-       } else {
-               Z_ADDREF_P(zsig);
-       }
-
-       Z_ADDREF_P(zkey);
-#endif
-       fci.retval_ptr_ptr = &retval_ptr;
-
-       if (FAILURE == zend_call_function(&fci, &fcc TSRMLS_CC)) {
-               zval_dtor(zdata);
-               zval_dtor(zsig);
-               zval_dtor(zkey);
-               efree(zdata);
-               efree(zkey);
-               efree(zsig);
-               return FAILURE;
-       }
-#if PHP_VERSION_ID < 50300
-       --(zdata->refcount);
-       --(zsig->refcount);
-       --(zkey->refcount);
-#else
-       Z_DELREF_P(zdata);
-
-       if (is_sign) {
-               Z_UNSET_ISREF_P(zsig);
-       } else {
-               Z_DELREF_P(zsig);
-       }
-
-       Z_DELREF_P(zkey);
-#endif
-       zval_dtor(zdata);
-       efree(zdata);
-       zval_dtor(zkey);
-       efree(zkey);
-
-       switch (Z_TYPE_P(retval_ptr)) {
-               default:
-               case IS_LONG:
-                       zval_dtor(zsig);
-                       efree(zsig);
-                       if (1 == Z_LVAL_P(retval_ptr)) {
-                               efree(retval_ptr);
-                               return SUCCESS;
-                       }
-                       efree(retval_ptr);
-                       return FAILURE;
-               case IS_BOOL:
-                       efree(retval_ptr);
-                       if (Z_BVAL_P(retval_ptr)) {
-                               *signature = estrndup(Z_STRVAL_P(zsig), 
Z_STRLEN_P(zsig));
-                               *signature_len = Z_STRLEN_P(zsig);
-                               zval_dtor(zsig);
-                               efree(zsig);
-                               return SUCCESS;
-                       }
-                       zval_dtor(zsig);
-                       efree(zsig);
-                       return FAILURE;
-       }
-}
-/* }}} */
-#endif /* #ifndef PHAR_HAVE_OPENSSL */
-
 /**
  * Save phar contents to disk
  *
@@ -3732,7 +3613,7 @@
        php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
        php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
        php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
-       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.41 $");
+       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.42 $");
        php_info_print_table_row(2, "Phar-based phar archives", "enabled");
        php_info_print_table_row(2, "Tar-based phar archives", "enabled");
        php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.phar?r1=1.7.2.34&r2=1.7.2.35&diff_format=u
Index: php-src/ext/phar/phar.phar



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

Reply via email to