diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-05-01 21:50:52 -0300 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2016-06-01 18:49:15 +0200 |
commit | e2d8fe5a6bae25452e82e76e50ee2e05320faee2 (patch) | |
tree | 1d05d6be9cb36b5926427bcde8c8127cc5233e1d /src/leap/keymanager/__init__.py | |
parent | 80993a5fb118bb46cc6da5847cbbd3f0bdc66e4e (diff) |
[feat] make get_all_keys aware of active addresses
- Resolves: #8068
Diffstat (limited to 'src/leap/keymanager/__init__.py')
-rw-r--r-- | src/leap/keymanager/__init__.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py index 6420f9a..fdd47c3 100644 --- a/src/leap/keymanager/__init__.py +++ b/src/leap/keymanager/__init__.py @@ -75,9 +75,6 @@ from leap.keymanager.errors import ( InvalidSignature ) from leap.keymanager.validation import ValidationLevels, can_upgrade - -from leap.keymanager.keys import build_key_from_dict -from leap.keymanager.documents import KEYMANAGER_KEY_TAG, TAGS_PRIVATE_INDEX from leap.keymanager.openpgp import OpenPGPScheme __version__ = get_versions()['version'] @@ -428,23 +425,7 @@ class KeyManager(object): :return: A Deferred which fires with a list of all keys in local db. :rtype: Deferred """ - # TODO: should it be based on activedocs? - def build_keys(docs): - return map( - lambda doc: build_key_from_dict(doc.content), - docs) - - # XXX: there is no check that the soledad indexes are ready, as it - # happens with EncryptionScheme. - # The usecases right now are not problematic. This could be solve - # adding a keytype to this funciont and moving the soledad request - # to the EncryptionScheme. - d = self._soledad.get_from_index( - TAGS_PRIVATE_INDEX, - KEYMANAGER_KEY_TAG, - '1' if private else '0') - d.addCallback(build_keys) - return d + return self._openpgp.get_all_keys(private) def gen_key(self): """ |