summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/openpgp.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2014-12-05 12:28:37 -0600
committerRuben Pollan <meskio@sindominio.net>2014-12-16 11:55:16 -0600
commit18d8fc8ab26885e24eaa05cc7843937b2381e4a8 (patch)
treeb6cbf80e97ad1b9a7bb62ff7ca2a07ef2362293b /src/leap/keymanager/openpgp.py
parent7bd310c0b67c337f4a13ffac631a2068c57e9740 (diff)
Fix key generation
Diffstat (limited to 'src/leap/keymanager/openpgp.py')
-rw-r--r--src/leap/keymanager/openpgp.py8
1 files changed, 2 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]: