From 9d07bbae0a4d9c64603481a9452b99cbff0f435e Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 17 May 2013 15:27:06 -0300 Subject: Do not attempt to fetch private keys from server. --- changes/bug_fix-do-not-attempt-to-fetch-privkeys-from-server | 1 + src/leap/common/keymanager/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/bug_fix-do-not-attempt-to-fetch-privkeys-from-server diff --git a/changes/bug_fix-do-not-attempt-to-fetch-privkeys-from-server b/changes/bug_fix-do-not-attempt-to-fetch-privkeys-from-server new file mode 100644 index 0000000..4c8c0eb --- /dev/null +++ b/changes/bug_fix-do-not-attempt-to-fetch-privkeys-from-server @@ -0,0 +1 @@ + o Fix attempt to fetch private keys from server. 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), -- cgit v1.2.3