diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-06-04 01:16:01 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-06-04 01:16:01 +1000 |
commit | 6f9f08005cd8973418662c716fec7c808e2cd0b2 (patch) | |
tree | 83af2f021f64c90003b94fce60f839a2bc6192aa /synapse/crypto/keyring.py | |
parent | add stuff in bg updates (diff) | |
parent | Merge pull request #5307 from matrix-org/rav/server_keys/07-fix-notary-cache-... (diff) | |
download | synapse-6f9f08005cd8973418662c716fec7c808e2cd0b2.tar.xz |
Merge remote-tracking branch 'origin/develop' into hawkowl/full-schema-v1
Diffstat (limited to 'synapse/crypto/keyring.py')
-rw-r--r-- | synapse/crypto/keyring.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index f4918d1bc6..b2f4cea536 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -399,7 +399,7 @@ class BaseV2KeyFetcher(object): @defer.inlineCallbacks def process_v2_response( - self, from_server, response_json, time_added_ms, requested_ids=[] + self, from_server, response_json, time_added_ms ): """Parse a 'Server Keys' structure from the result of a /key request @@ -422,10 +422,6 @@ class BaseV2KeyFetcher(object): time_added_ms (int): the timestamp to record in server_keys_json - requested_ids (iterable[str]): a list of the key IDs that were requested. - We will store the json for these key ids as well as any that are - actually in the response - Returns: Deferred[dict[str, FetchKeyResult]]: map from key_id to result object """ @@ -481,11 +477,6 @@ class BaseV2KeyFetcher(object): signed_key_json_bytes = encode_canonical_json(signed_key_json) - # for reasons I don't quite understand, we store this json for the key ids we - # requested, as well as those we got. - updated_key_ids = set(requested_ids) - updated_key_ids.update(verify_keys) - yield logcontext.make_deferred_yieldable( defer.gatherResults( [ @@ -498,7 +489,7 @@ class BaseV2KeyFetcher(object): ts_expires_ms=ts_valid_until_ms, key_json_bytes=signed_key_json_bytes, ) - for key_id in updated_key_ids + for key_id in verify_keys ], consumeErrors=True, ).addErrback(unwrapFirstError) @@ -754,7 +745,6 @@ class ServerKeyFetcher(BaseV2KeyFetcher): response_keys = yield self.process_v2_response( from_server=server_name, - requested_ids=[requested_key_id], response_json=response, time_added_ms=time_now_ms, ) |