summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-17 15:27:06 -0300
committerdrebs <drebs@leap.se>2013-05-17 15:27:06 -0300
commit9d07bbae0a4d9c64603481a9452b99cbff0f435e (patch)
tree4058cae48049d115fcf4f6eb9d29949b07463fda /src/leap
parent5c971f5a57ebac56f27d0374fe24942124be4406 (diff)
Do not attempt to fetch private keys from server.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/common/keymanager/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/common/keymanager/__init__.py b/src/leap/common/keymanager/__init__.py
index ab28510..3427f03 100644
--- a/src/leap/common/keymanager/__init__.py
+++ b/src/leap/common/keymanager/__init__.py
@@ -192,7 +192,9 @@ class KeyManager(object):
try:
return self._wrapper_map[ktype].get_key(address, private=private)
except KeyNotFound:
- if fetch_remote is False:
+ # we will only try to fetch a key from nickserver if fetch_remote
+ # is True and the key is not private.
+ if fetch_remote is False or private is True:
raise
# fetch keys from server and discard unwanted types.
keys = filter(lambda k: isinstance(k, ktype),