From ede293946c2ae49a7868e4513dd8c1325b3f898d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sat, 02 Apr 2016 03:39:50 -0400 Subject: [PATCH] Merge branch 'attach-pgp-key' of https://github.com/guitarmanusa/roundcubemail-1 into 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