From 0344b168276f80189e2254c75a762aff5b517b6b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 22 May 2016 06:32:57 -0400
Subject: [PATCH] Fix priority icon(s) position
---
plugins/enigma/lib/enigma_driver_phpssl.php | 40 ++++++++++++++++------------------------
1 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/plugins/enigma/lib/enigma_driver_phpssl.php b/plugins/enigma/lib/enigma_driver_phpssl.php
index 6686d7d..a5aa6de 100644
--- a/plugins/enigma/lib/enigma_driver_phpssl.php
+++ b/plugins/enigma/lib/enigma_driver_phpssl.php
@@ -1,20 +1,14 @@
<?php
-/*
+
+/**
+-------------------------------------------------------------------------+
- | S/MIME driver for the Enigma Plugin |
+ | S/MIME driver for the Enigma Plugin |
| |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
+ | Copyright (C) 2010-2015 The Roundcube Dev Team |
| |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of the GNU General Public License along |
- | with this program; if not, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
| |
+-------------------------------------------------------------------------+
| Author: Aleksander Machniak <alec@alec.pl> |
@@ -45,15 +39,15 @@
$homedir = $this->rc->config->get('enigma_smime_homedir', INSTALL_PATH . '/plugins/enigma/home');
if (!$homedir)
- return new enigma_error(enigma_error::E_INTERNAL,
+ return new enigma_error(enigma_error::INTERNAL,
"Option 'enigma_smime_homedir' not specified");
// check if homedir exists (create it if not) and is readable
if (!file_exists($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
+ return new enigma_error(enigma_error::INTERNAL,
"Keys directory doesn't exists: $homedir");
if (!is_writable($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
+ return new enigma_error(enigma_error::INTERNAL,
"Keys directory isn't writeable: $homedir");
$homedir = $homedir . '/' . $this->user;
@@ -63,10 +57,10 @@
mkdir($homedir, 0700);
if (!file_exists($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
+ return new enigma_error(enigma_error::INTERNAL,
"Unable to create keys directory: $homedir");
if (!is_writable($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
+ return new enigma_error(enigma_error::INTERNAL,
"Unable to write to keys directory: $homedir");
$this->homedir = $homedir;
@@ -81,7 +75,7 @@
{
}
- function sign($text, $key, $passwd)
+ function sign($text, $key, $passwd, $mode = null)
{
}
@@ -110,7 +104,7 @@
if ($sig !== true) {
// try without certificate verification
$sig = openssl_pkcs7_verify($msg_file, PKCS7_NOVERIFY, $cert_file);
- $validity = enigma_error::E_UNVERIFIED;
+ $validity = enigma_error::UNVERIFIED;
}
if ($sig === true) {
@@ -118,7 +112,7 @@
}
else {
$errorstr = $this->get_openssl_error();
- $sig = new enigma_error(enigma_error::E_INTERNAL, $errorstr);
+ $sig = new enigma_error(enigma_error::INTERNAL, $errorstr);
}
// remove temp files
@@ -189,8 +183,6 @@
$skey->expires = $subkey->getExpirationDate();
$skey->fingerprint = $subkey->getFingerprint();
$skey->has_private = $subkey->hasPrivate();
- $skey->can_sign = $subkey->canSign();
- $skey->can_encrypt = $subkey->canEncrypt();
$ekey->subkeys[$idx] = $skey;
};
@@ -217,7 +209,7 @@
if (empty($cert) || empty($cert['subject'])) {
$errorstr = $this->get_openssl_error();
- return new enigma_error(enigm_error::E_INTERNAL, $errorstr);
+ return new enigma_error(enigma_error::INTERNAL, $errorstr);
}
$data = new enigma_signature();
--
Gitblit v1.9.1