From: Stig Bakken Date: Tue, 22 Oct 2002 23:07:10 +0000 (+0000) Subject: * add some signature handling config options X-Git-Tag: php-4.3.0pre2~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8082619e800a4235ceed7c2461a12733288cc2b4;p=php * add some signature handling config options --- diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 5158144d2d..194674f658 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -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',