summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-19 12:49:38 +0100
committerErik Johnston <erik@matrix.org>2015-05-19 12:49:38 +0100
commit2b7120e233999c4c89edb46b2714238e828aacc6 (patch)
treea7365d4e64e60686cc9b5b4386b97391018cef32 /synapse/crypto
parentDon't reuse var names (diff)
downloadsynapse-2b7120e233999c4c89edb46b2714238e828aacc6.tar.xz
SYN-383: Handle the fact the server might not have signed things
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/keyring.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index 1f24e58ba0..a061def16a 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -329,7 +329,7 @@ class Keyring(object):
                 verify_key.time_added = time_now_ms
                 old_verify_keys[key_id] = verify_key
 
-        for key_id in response_json["signatures"][server_name]:
+        for key_id in response_json["signatures"].get(server_name, {}):
             if key_id not in response_json["verify_keys"]:
                 raise ValueError(
                     "Key response must include verification keys for all"