summaryrefslogtreecommitdiff
path: root/src/leap/keymanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/keymanager')
-rw-r--r--src/leap/keymanager/openpgp.py8
-rw-r--r--src/leap/keymanager/tests/test_openpgp.py3
2 files changed, 5 insertions, 6 deletions
diff --git a/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py
index f81fb0a0..c95b3817 100644
--- a/src/leap/keymanager/openpgp.py
+++ b/src/leap/keymanager/openpgp.py
@@ -282,11 +282,6 @@ class OpenPGPScheme(EncryptionScheme):
pubkeys = gpg.list_keys()
# assert for new key characteristics
-
- # XXX This exception is not properly catched by the soledad
- # bootstrapping, so if we do not finish generating the keys
- # we end with a blocked thread -- kali
-
leap_assert(
len(pubkeys) is 1, # a unitary keyring!
'Keyring has wrong number of keys: %d.' % len(pubkeys))
@@ -298,8 +293,9 @@ class OpenPGPScheme(EncryptionScheme):
for uid in key['uids']:
if re.match('.*<%s>$' % address, uid) is not None:
uid_match = True
- return
+ break
leap_assert(uid_match, 'Key not correctly bound to address.')
+
# insert both public and private keys in storage
deferreds = []
for secret in [True, False]:
diff --git a/src/leap/keymanager/tests/test_openpgp.py b/src/leap/keymanager/tests/test_openpgp.py
index 01cf3417..e6f56e26 100644
--- a/src/leap/keymanager/tests/test_openpgp.py
+++ b/src/leap/keymanager/tests/test_openpgp.py
@@ -43,6 +43,9 @@ from leap.keymanager.tests import (
class OpenPGPCryptoTestCase(KeyManagerWithSoledadTestCase):
+ # set the trial timeout to 20min, needed by the key generation test
+ timeout = 1200
+
@inlineCallbacks
def _test_openpgp_gen_key(self):
pgp = openpgp.OpenPGPScheme(