mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Add some debug to help diagnose weird federation issue
This commit is contained in:
parent
bd08ee7a46
commit
c36d15d2de
@ -96,10 +96,11 @@ class Keyring(object):
|
|||||||
verify_requests = []
|
verify_requests = []
|
||||||
|
|
||||||
for server_name, json_object in server_and_json:
|
for server_name, json_object in server_and_json:
|
||||||
logger.debug("Verifying for %s", server_name)
|
|
||||||
|
|
||||||
key_ids = signature_ids(json_object, server_name)
|
key_ids = signature_ids(json_object, server_name)
|
||||||
if not key_ids:
|
if not key_ids:
|
||||||
|
logger.warn("Request from %s: no supported signature keys",
|
||||||
|
server_name)
|
||||||
deferred = defer.fail(SynapseError(
|
deferred = defer.fail(SynapseError(
|
||||||
400,
|
400,
|
||||||
"Not signed with a supported algorithm",
|
"Not signed with a supported algorithm",
|
||||||
@ -108,6 +109,9 @@ class Keyring(object):
|
|||||||
else:
|
else:
|
||||||
deferred = defer.Deferred()
|
deferred = defer.Deferred()
|
||||||
|
|
||||||
|
logger.debug("Verifying for %s with key_ids %s",
|
||||||
|
server_name, key_ids)
|
||||||
|
|
||||||
verify_request = VerifyKeyRequest(
|
verify_request = VerifyKeyRequest(
|
||||||
server_name, key_ids, json_object, deferred
|
server_name, key_ids, json_object, deferred
|
||||||
)
|
)
|
||||||
@ -142,6 +146,9 @@ class Keyring(object):
|
|||||||
|
|
||||||
json_object = verify_request.json_object
|
json_object = verify_request.json_object
|
||||||
|
|
||||||
|
logger.debug("Got key %s %s:%s for server %s, verifying" % (
|
||||||
|
key_id, verify_key.alg, verify_key.version, server_name,
|
||||||
|
))
|
||||||
try:
|
try:
|
||||||
verify_signed_json(json_object, server_name, verify_key)
|
verify_signed_json(json_object, server_name, verify_key)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user