]> granicus.if.org Git - php/commitdiff
preliminary work on using gnupg to verify/create signatures - no implementation,...
authorGreg Beaver <cellog@php.net>
Sat, 24 Nov 2007 04:30:08 +0000 (04:30 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 24 Nov 2007 04:30:08 +0000 (04:30 +0000)
ext/phar/config.m4
ext/phar/config.w32
ext/phar/phar.c
ext/phar/phar_internal.h

index d5a189a32037021f4af2209165c709bcb475cca0..e80cf38e8de72a3c7a760e1f68e62c7393ce11d4 100644 (file)
@@ -9,5 +9,6 @@ if test "$PHP_PHAR" != "no"; then
   PHP_ADD_EXTENSION_DEP(phar, zlib, true)
   PHP_ADD_EXTENSION_DEP(phar, bz2, false)
   PHP_ADD_EXTENSION_DEP(phar, spl, false)
+  PHP_ADD_EXTENSION_DEP(phar, gnupg, false)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
index 8def276a5b8f90cc723f4a26a5df6439b5b6cdd5..035bcfefdead3ec4d65d1b040f5e84578ec3402a 100644 (file)
@@ -8,4 +8,5 @@ if (PHP_PHAR != "no") {
        ADD_EXTENSION_DEP('phar', 'zlib', true);
        ADD_EXTENSION_DEP('phar', 'bz2', false);
        ADD_EXTENSION_DEP('phar', 'spl', false);
+       ADD_EXTENSION_DEP('phar', 'gnupg', false);
 }
index 54953651cb68a61da0e96b644de03137f7dfa1fe..442c0479502582c52efb6ab1d134ccfccdb3aa98 100644 (file)
@@ -3816,6 +3816,18 @@ PHP_MINFO_FUNCTION(phar) /* {{{ */
 #else
        php_info_print_table_row(2, "bzip2 compression", 
                "disabled");
+#endif
+#if HAVE_GNUPGLIB
+        if (zend_hash_exists(&module_registry, "gnupg", sizeof("gnupg"))) {
+               php_info_print_table_row(2, "GPG signature", 
+                       "enabled");
+       } else {
+               php_info_print_table_row(2, "GPG signature", 
+                       "disabled (install pecl/gnupg)");
+       }
+#else
+       php_info_print_table_row(2, "GPG signature", 
+               "disabled");
 #endif
        php_info_print_table_end();
 
@@ -3838,6 +3850,9 @@ static zend_module_dep phar_deps[] = {
 #if HAVE_BZ2
        ZEND_MOD_OPTIONAL("bz2")
 #endif
+#if HAVE_GNUPG
+       ZEND_MOD_OPTIONAL("gnupg")
+#endif
 #if HAVE_SPL
        ZEND_MOD_REQUIRED("spl")
 #endif
index f2f2e55be85c89f442b2eb479d65a653ecce3bd4..3a482a07dce05c29113822917e17efeb9d808938 100755 (executable)
@@ -49,6 +49,9 @@
 #include "ext/spl/spl_exceptions.h"
 #include "ext/spl/spl_iterators.h"
 #endif
+#if HAVE_GNUPGLIB
+#include "ext/gnupg/php_gnupg.h"
+#endif
 #include "php_phar.h"
 #ifdef HAVE_STDINT_H
 #include <stdint.h>