From a9d399155d205ae41015d7d205c6dacd7ecfc0d2 Mon Sep 17 00:00:00 2001
From: Kyle Francis <franck6@rpi.edu>
Date: Wed, 30 Mar 2016 09:33:53 -0400
Subject: [PATCH] Implemented attaching pub PGP key to outgoing messages.
---
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