summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2017-04-25 10:44:25 +0100
committerGitHub <noreply@github.com>2017-04-25 10:44:25 +0100
commit33d5134b593375ca8b40cc28a3134e743b3b4a1c (patch)
treef3b84e70d2100843eee71ac85f9f3caf57650607 /synapse
parentMerge pull request #2145 from matrix-org/rav/reject_invite_to_unreachable_server (diff)
parentFix code for reporting old verify keys in synapse (diff)
downloadsynapse-33d5134b593375ca8b40cc28a3134e743b3b4a1c.tar.xz
Merge pull request #2156 from matrix-org/markjh/old_verify_keys
Fix code for reporting old verify keys in synapse
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/key/v2/local_key_resource.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/rest/key/v2/local_key_resource.py b/synapse/rest/key/v2/local_key_resource.py
index ff95269ba8..be68d9a096 100644
--- a/synapse/rest/key/v2/local_key_resource.py
+++ b/synapse/rest/key/v2/local_key_resource.py
@@ -84,12 +84,11 @@ class LocalKey(Resource):
             }
 
         old_verify_keys = {}
-        for key in self.config.old_signing_keys:
-            key_id = "%s:%s" % (key.alg, key.version)
+        for key_id, key in self.config.old_signing_keys.items():
             verify_key_bytes = key.encode()
             old_verify_keys[key_id] = {
                 u"key": encode_base64(verify_key_bytes),
-                u"expired_ts": key.expired,
+                u"expired_ts": key.expired_ts,
             }
 
         tls_fingerprints = self.config.tls_fingerprints