]> granicus.if.org Git - php/commitdiff
* add some signature handling config options
authorStig Bakken <ssb@php.net>
Tue, 22 Oct 2002 23:07:10 +0000 (23:07 +0000)
committerStig Bakken <ssb@php.net>
Tue, 22 Oct 2002 23:07:10 +0000 (23:07 +0000)
pear/PEAR/Config.php

index 5158144d2d8ba140abb9f4294afb83bdccc370e2..194674f658039652d4a37c9640724a34810b9554 100644 (file)
@@ -52,7 +52,7 @@ define('PEAR_CONFIG_DEFAULT_TESTDIR',
        PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests');
 
 define('PEAR_CONFIG_DEFAULT_CACHEDIR',
-         System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . DIRECTORY_SEPARATOR . 'cache');
+       System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . DIRECTORY_SEPARATOR . 'cache');
 
 if (@is_dir(PHP_SYSCONFDIR)) {
     define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR);
@@ -73,6 +73,15 @@ if (@is_dir(PHP_SYSCONFDIR)) {
 }
 define('PEAR_DEFAULT_UMASK', umask());
 
+if (OS_WINDOWS) {
+    define('PEAR_DEFAULT_GPG_BIN', System::which('gpg', 'c:\gnupg\gpg.exe'));
+} else {
+    define('PEAR_DEFAULT_GPG_BIN', System::which('gpg', '/usr/local/bin/gpg'));
+}
+
+define('PEAR_DEFAULT_SIG_KEYDIR',
+       PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys');
+
 /**
  * This is a class for storing configuration data, keeping track of
  * which are system-defined, user-defined or defaulted.
@@ -234,6 +243,28 @@ class PEAR_Config extends PEAR
             'prompt' => 'Cache TimeToLive',
             'group' => 'Advanced',
             ),
+        'sig_type' => array(
+            'type' => 'set',
+            'default' => 'gpg',
+            'doc' => 'which package signature mechanism to use',
+            'valid_set' => array('gpg'),
+            'prompt' => 'Package Signature Type',
+            'group' => 'Maintainers',
+            ),
+        'sig_bin' => array(
+            'type' => 'string',
+            'default' => PEAR_DEFAULT_GPG_BIN,
+            'doc' => 'which package signature mechanism to use',
+            'prompt' => 'Signature Handling Program',
+            'group' => 'Maintainers',
+            ),
+        'sig_keydir' => array(
+            'type' => 'string',
+            'default' => PEAR_DEFAULT_SIG_KEYDIR,
+            'doc' => 'which package signature mechanism to use',
+            'prompt' => 'Signature Key Directory',
+            'group' => 'Maintainers',
+            ),
 /*
         'testset1' => array(
             'type' => 'set',