diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-07 14:13:18 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-07 14:13:18 -0400 |
commit | d3f2fbcfe577f42d0208d15a57bd66e56186742a (patch) | |
tree | 30359f4b9533d9f5c96e98b009401bbf55fc4204 /synapse/handlers/e2e_keys.py | |
parent | Merge branch 'uhoreg/e2e_cross-signing_merged' into cross-signing_sig_upload (diff) | |
download | synapse-d3f2fbcfe577f42d0208d15a57bd66e56186742a.tar.xz |
add function docs
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r-- | synapse/handlers/e2e_keys.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index 95f3cc891b..cca361b15b 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -659,6 +659,18 @@ class E2eKeysHandler(object): @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: @@ -776,8 +788,18 @@ class E2eKeysHandler(object): @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: |