summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/keymanager/keys.py6
-rw-r--r--src/leap/bitmask/keymanager/openpgp.py7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/leap/bitmask/keymanager/keys.py b/src/leap/bitmask/keymanager/keys.py
index 7e8d8ead..6aca0320 100644
--- a/src/leap/bitmask/keymanager/keys.py
+++ b/src/leap/bitmask/keymanager/keys.py
@@ -49,7 +49,7 @@ def is_address(address):
return bool(re.match('[\w.-]+@[\w.-]+', address))
-def build_key_from_dict(key, active=None):
+def build_key_from_dict(key, active=None, gpgbinary=None):
"""
Build an OpenPGPKey key based on info in C{kdict}.
@@ -57,6 +57,9 @@ def build_key_from_dict(key, active=None):
:type key: dict
:param active: Dictionary with active data.
:type active: dict
+ :param gpgbinary: Name for GnuPG binary executable.
+ :type gpgbinary: C{str}
+
:return: An instance of the key.
:rtype: C{kClass}
"""
@@ -94,6 +97,7 @@ def build_key_from_dict(key, active=None):
validation=validation,
encr_used=encr_used,
sign_used=sign_used,
+ gpgbinary=gpgbinary,
)
diff --git a/src/leap/bitmask/keymanager/openpgp.py b/src/leap/bitmask/keymanager/openpgp.py
index 593536eb..d82f8e52 100644
--- a/src/leap/bitmask/keymanager/openpgp.py
+++ b/src/leap/bitmask/keymanager/openpgp.py
@@ -332,10 +332,13 @@ class OpenPGPScheme(object):
else:
key = yield self._repair_key_docs(fp_keys)
key.content[HAS_ACTIVE] = True
- keys.append(build_key_from_dict(key.content, active.content))
+ keys.append(build_key_from_dict(key.content, active.content,
+ gpgbinary=self._gpgbinary))
unactive_keys = filter(lambda k: HAS_ACTIVE not in k.content, key_docs)
- keys += map(lambda k: build_key_from_dict(k.content), unactive_keys)
+ keys += map(lambda k: build_key_from_dict(k.content,
+ gpgbinary=self._gpgbinary),
+ unactive_keys)
defer.returnValue(keys)
def parse_key(self, key_data, address=None):