summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-04-29 12:14:08 +0100
committerMark Haines <mark.haines@matrix.org>2015-04-29 12:14:08 +0100
commit74874ffda7dd4c72cf723d1f5bce757a852bfcb6 (patch)
treec0b407f920d94e3dfb02caff82a0b7aa15f12fa6 /synapse/crypto
parentImplement minimum_valid_until_ts in the remote key resource (diff)
downloadsynapse-74874ffda7dd4c72cf723d1f5bce757a852bfcb6.tar.xz
Update the query format used by keyring to match current key v2 spec
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/keyring.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index bfe6e61602..078361fa85 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -171,10 +171,21 @@ class Keyring(object):
         )
 
         with limiter:
+            # TODO(mark): Set the minimum_valid_until_ts to that needed by
+            # the events being validated or the current time if validating
+            # an incoming request.
             responses = yield self.client.post_json(
                 destination=perspective_name,
                 path=b"/_matrix/key/v2/query",
-                data={u"server_keys": {server_name: list(key_ids)}},
+                data={
+                    u"server_keys": {
+                        server_name: {
+                            key_id: {
+                                u"minimum_valid_until_ts": 0
+                            } for key_id in key_ids
+                        }
+                    }
+                },
             )
 
         keys = {}