summary refs log tree commit diff
path: root/synapse/rest/key
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2017-04-24 18:51:25 +0100
committerMark Haines <mark.haines@matrix.org>2017-04-24 18:51:25 +0100
commite6e262763663a7aebd3e38ee9763faeff64459c8 (patch)
treef3b84e70d2100843eee71ac85f9f3caf57650607 /synapse/rest/key
parentMerge pull request #2145 from matrix-org/rav/reject_invite_to_unreachable_server (diff)
downloadsynapse-e6e262763663a7aebd3e38ee9763faeff64459c8.tar.xz
Fix code for reporting old verify keys in synapse
Diffstat (limited to 'synapse/rest/key')
-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