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_driver_gnupg.php | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php index 5ddf724..ab4aa45 100644 --- a/plugins/enigma/lib/enigma_driver_gnupg.php +++ b/plugins/enigma/lib/enigma_driver_gnupg.php @@ -339,6 +339,17 @@ } } + public function pubkey_for_attach($email) + { + try { + $pubkey = $this->gpg->exportPublicKey($email, true); + return $pubkey; + } + catch (Exception $e) { + return $this->get_error_from_exception($e); + } + } + /** * Converts Crypt_GPG exception into Enigma's error object * -- Gitblit v1.9.1