Enigma: Add enigma_debug option
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Enigma: Added enigma_debug option |
| | | |
| | | RELEASE 1.2-rc |
| | | -------------- |
| | | - Managesieve: Refactored script parser to be 100x faster |
| | |
| | | - Net_IDNA2 0.1.1 or newer |
| | | - Auth_SASL 1.0.6 or newer |
| | | - Net_Sieve 1.3.2 or newer (for managesieve plugin) |
| | | - Crypt_GPG 1.4.0 or newer (for enigma plugin) |
| | | - Crypt_GPG 1.4.1 or newer (for enigma plugin) |
| | | * php.ini options (see .htaccess file): |
| | | - error_reporting E_ALL & ~E_NOTICE (or lower) |
| | | - memory_limit > 16MB (increase as suitable to support large attachments) |
| | |
| | | "pear-pear.php.net/net_idna2": "~0.1.1", |
| | | "pear-pear.php.net/mail_mime": "~1.10.0", |
| | | "pear-pear.php.net/net_smtp": "~1.7.1", |
| | | "pear-pear.php.net/crypt_gpg": "~1.4.0", |
| | | "pear-pear.php.net/crypt_gpg": "~1.4.1", |
| | | "roundcube/net_sieve": "~1.5.0" |
| | | }, |
| | | "require-dev": { |
| | |
| | | "require": { |
| | | "php": ">=5.3.0", |
| | | "roundcube/plugin-installer": "~0.1.6", |
| | | "pear-pear.php.net/crypt_gpg": "~1.4.0" |
| | | "pear-pear.php.net/crypt_gpg": "~1.4.1" |
| | | } |
| | | } |
| | |
| | | // A driver to use for S/MIME. Default: "phpssl". |
| | | $config['enigma_smime_driver'] = 'phpssl'; |
| | | |
| | | // Enables logging of enigma operations (including Crypt_GPG debug info) |
| | | $config['enigma_debug'] = false; |
| | | |
| | | // Keys directory for all users. Default 'enigma/home'. |
| | | // Must be writeable by PHP process |
| | | $config['enigma_pgp_homedir'] = null; |
| | |
| | | function init() |
| | | { |
| | | $homedir = $this->rc->config->get('enigma_pgp_homedir', INSTALL_PATH . 'plugins/enigma/home'); |
| | | $debug = $this->rc->config->get('enigma_debug'); |
| | | |
| | | if (!$homedir) |
| | | return new enigma_error(enigma_error::INTERNAL, |
| | |
| | | $this->gpg = new Crypt_GPG(array( |
| | | 'homedir' => $this->homedir, |
| | | // 'binary' => '/usr/bin/gpg2', |
| | | // 'debug' => true, |
| | | 'debug' => $debug ? array($this, 'debug') : false, |
| | | )); |
| | | } |
| | | catch (Exception $e) { |
| | |
| | | public function gen_key($data) |
| | | { |
| | | try { |
| | | $debug = $this->rc->config->get('enigma_debug'); |
| | | $keygen = new Crypt_GPG_KeyGenerator(array( |
| | | 'homedir' => $this->homedir, |
| | | // 'binary' => '/usr/bin/gpg2', |
| | | // 'debug' => true, |
| | | 'debug' => $debug ? array($this, 'debug') : false, |
| | | )); |
| | | |
| | | $key = $keygen |
| | |
| | | |
| | | return $ekey; |
| | | } |
| | | |
| | | /** |
| | | * Write debug info from Crypt_GPG to logs/enigma |
| | | */ |
| | | public function debug($line) |
| | | { |
| | | rcube::write_log('enigma', 'GPG: ' . $line); |
| | | } |
| | | } |