summaryrefslogtreecommitdiff
path: root/src/leap/email/smtp/smtprelay.tac
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2012-11-05 10:29:24 -0200
committerdrebs <drebs@leap.se>2012-11-05 10:29:24 -0200
commit728eef32a7eab7d90db4a9b72d74cc7ecd1b6265 (patch)
tree90a631b5b3f07635708e4767c4708ee4ec607b08 /src/leap/email/smtp/smtprelay.tac
parentbe9265fc7c15cd6e135fc31a788b2d9233e2f83e (diff)
gpg wrapper is configurable
Diffstat (limited to 'src/leap/email/smtp/smtprelay.tac')
-rw-r--r--src/leap/email/smtp/smtprelay.tac7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/email/smtp/smtprelay.tac b/src/leap/email/smtp/smtprelay.tac
index 1b89a32c..8226bf3d 100644
--- a/src/leap/email/smtp/smtprelay.tac
+++ b/src/leap/email/smtp/smtprelay.tac
@@ -139,8 +139,8 @@ class GPGWrapper():
GNUPG_HOME = "~/.config/leap/gnupg"
GNUPG_BINARY = "/usr/bin/gpg" # this has to be changed based on OS
- def __init__(self):
- self.gpg = gnupg.GPG(gnupghome=self.GNUPG_HOME, gpgbinary=self.GNUPG_BINARY)
+ def __init__(self, gpghome=GNUPG_HOME, gpgbinary=GNUPG_BINARY):
+ self.gpg = gnupg.GPG(gnupghome=gpghome, gpgbinary=gpgbinary)
def get_fingerprint(self, email):
"""
@@ -154,6 +154,9 @@ class GPGWrapper():
def encrypt(self, data, recipient):
return self.gpg.encrypt(data, recipient)
+ def import_keys(self, data):
+ return self.gpg.import_keys(data)
+
# service configuration
port = 25