mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 13:11:52 +00:00
Fixup review comments
This commit is contained in:
parent
62fb643cdc
commit
7af5a63063
@ -1029,8 +1029,8 @@ signing_key_path: "CONFDIR/SERVERNAME.signing.key"
|
|||||||
# - server_name: "matrix.org"
|
# - server_name: "matrix.org"
|
||||||
#
|
#
|
||||||
|
|
||||||
# The additional signing keys to use when acting as a trusted key server, on
|
# The signing keys to use when acting as a trusted key server. If not specified
|
||||||
# top of the normal signing keys.
|
# defaults to the server signing key.
|
||||||
#
|
#
|
||||||
# Can contain multiple keys, one per line.
|
# Can contain multiple keys, one per line.
|
||||||
#
|
#
|
||||||
|
@ -539,7 +539,7 @@ class BaseV2KeyFetcher(object):
|
|||||||
verify_key=verify_key, valid_until_ts=key_data["expired_ts"]
|
verify_key=verify_key, valid_until_ts=key_data["expired_ts"]
|
||||||
)
|
)
|
||||||
|
|
||||||
signed_key_json_bytes = encode_canonical_json(response_json)
|
key_json_bytes = encode_canonical_json(response_json)
|
||||||
|
|
||||||
yield make_deferred_yieldable(
|
yield make_deferred_yieldable(
|
||||||
defer.gatherResults(
|
defer.gatherResults(
|
||||||
@ -551,7 +551,7 @@ class BaseV2KeyFetcher(object):
|
|||||||
from_server=from_server,
|
from_server=from_server,
|
||||||
ts_now_ms=time_added_ms,
|
ts_now_ms=time_added_ms,
|
||||||
ts_expires_ms=ts_valid_until_ms,
|
ts_expires_ms=ts_valid_until_ms,
|
||||||
key_json_bytes=signed_key_json_bytes,
|
key_json_bytes=key_json_bytes,
|
||||||
)
|
)
|
||||||
for key_id in verify_keys
|
for key_id in verify_keys
|
||||||
],
|
],
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from canonicaljson import json
|
from canonicaljson import encode_canonical_json, json
|
||||||
from signedjson.sign import sign_json
|
from signedjson.sign import sign_json
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
@ -227,4 +227,4 @@ class RemoteKey(DirectServeResource):
|
|||||||
|
|
||||||
results = {"server_keys": signed_keys}
|
results = {"server_keys": signed_keys}
|
||||||
|
|
||||||
respond_with_json_bytes(request, 200, json.dumps(results).encode("utf-8"))
|
respond_with_json_bytes(request, 200, encode_canonical_json(results))
|
||||||
|
Loading…
Reference in New Issue
Block a user