From 4c7ce7bfc917ca76dede8ae29ad4ab96a67968fd Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 02 Apr 2016 03:40:17 -0400
Subject: [PATCH] Merge branch 'guitarmanusa-attach-pgp-key'

---
 plugins/enigma/lib/enigma_engine.php |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index 96f792d..d2f3972 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -921,6 +921,38 @@
         return $result;
     }
 
+    function get_gpg_pubkey_for_attach($email)
+    {
+        $this->load_pgp_driver();
+        $result = $this->pgp_driver->pubkey_for_attach($email);
+
+        if ($result instanceof enigma_error) {
+            rcube::raise_error(array(
+                'code' => 600, 'type' => 'php',
+                'file' => __FILE__, 'line' => __LINE__,
+                'message' => "Enigma plugin: " . $result->getMessage()
+                ), true, false);
+        }
+
+        return $result;
+    }
+
+    function get_keyID($email)
+    {
+        $this->load_pgp_driver();
+        $result = $this->pgp_driver->get_keyID($email);
+
+        if ($result instanceof enigma_error) {
+            rcube::raise_error(array(
+                'code' => 600, 'type' => 'php',
+                'file' => __FILE__, 'line' => __LINE__,
+                'message' => "Enigma plugin: " . $result->getMessage()
+                ), true, false);
+        }
+
+        return $result;
+    }
+
     /**
      * Find PGP private/public key
      *

--
Gitblit v1.9.1