Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
add function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Sep 7, 2019
1 parent b6e3dec commit d3f2fbc
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,18 @@ def upload_signatures_for_device_keys(self, user_id, signatures):

@defer.inlineCallbacks
def _process_self_signatures(self, user_id, signatures):
"""Process uploaded signatures of the user's own keys.
Args:
user_id (string): the user uploading the keys
signatures (dict[string, dict]): map of devices to signed keys
Returns:
(list[(string, string, string, string)], dict[string, dict[string, dict]]):
a list of signatures to upload, in the form (signing_key_id, target_user_id,
target_device_id, signature), and a map of users to devices to failure
reasons
"""
signature_list = []
failures = {}
if not signatures:
Expand Down Expand Up @@ -776,8 +788,18 @@ def _process_self_signatures(self, user_id, signatures):

@defer.inlineCallbacks
def _process_other_signatures(self, user_id, signatures):
# now check non-self signatures. These signatures will be signed
# by the user-signing key
"""Process uploaded signatures of other users' keys.
Args:
user_id (string): the user uploading the keys
signatures (dict[string, dict]): map of users to devices to signed keys
Returns:
(list[(string, string, string, string)], dict[string, dict[string, dict]]):
a list of signatures to upload, in the form (signing_key_id, target_user_id,
target_device_id, signature), and a map of users to devices to failure
reasons
"""
signature_list = []
failures = {}
if not signatures:
Expand Down

0 comments on commit d3f2fbc

Please sign in to comment.