From 728eef32a7eab7d90db4a9b72d74cc7ecd1b6265 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 5 Nov 2012 10:29:24 -0200 Subject: gpg wrapper is configurable --- src/leap/email/smtp/smtprelay.tac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3