summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-11-20 17:38:58 +0000
committerErik Johnston <erik@matrix.org>2015-11-20 17:38:58 +0000
commit2ca01ed7470bd1fb0aa9cab0ad0546ea2911b682 (patch)
treed5d1c71f050d27e929daa72954704ad330cc9194 /synapse/crypto
parentMerge branch 'hotfixes-v0.11.0-r2' of github.com:matrix-org/synapse (diff)
parentMerge branch 'erikj/perspective_limiter' into release-v0.11.1 (diff)
downloadsynapse-0.11.1.tar.xz
Merge branch 'release-v0.11.1' of github.com:matrix-org/synapse v0.11.1
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/keyring.py38
1 files changed, 17 insertions, 21 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py

index 8b6a59866f..bc5bb5cdb1 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py
@@ -381,28 +381,24 @@ class Keyring(object): def get_server_verify_key_v2_indirect(self, server_names_and_key_ids, perspective_name, perspective_keys): - limiter = yield get_retry_limiter( - perspective_name, self.clock, self.store - ) - - 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. - query_response = yield self.client.post_json( - destination=perspective_name, - path=b"/_matrix/key/v2/query", - data={ - u"server_keys": { - server_name: { - key_id: { - u"minimum_valid_until_ts": 0 - } for key_id in key_ids - } - for server_name, key_ids in server_names_and_key_ids + # 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. + query_response = yield self.client.post_json( + destination=perspective_name, + path=b"/_matrix/key/v2/query", + data={ + u"server_keys": { + server_name: { + key_id: { + u"minimum_valid_until_ts": 0 + } for key_id in key_ids } - }, - ) + for server_name, key_ids in server_names_and_key_ids + } + }, + long_retries=True, + ) keys = {}