Expand description
Implements the signature upload endpoint (See https://spec.matrix.org/v1.16/client-server-api/#post_matrixclientv3keyssignaturesupload).
This endpoint is quite complex in that it requires many checks in order to be done properly. This is why it got its dedicated module.
StructsΒ§
- Signature
Error - Thrown when a signature is not valid
- Signatures
Component - Component implementing endpoints for signatures.
- Valid
Signature - Contains a signature to be inserted in the database.
EnumsΒ§
FunctionsΒ§
- check_
signing π - Checks that a signature uploaded in
upload_keys_signatureis cryptographically correct. - new_
failure π - Helper function that generates a [
upload_signatures::v3::Failure]. These are returned by theupload_keys_signatureendpoint. - process_
device_ πkeys_ signatures - This function is part of
upload_keys_signatureand processes signatures uploaded for device keys owned by the requester. - process_
other_ πmaster_ key_ signatures - This function is part of
upload_keys_signatureand processes signatures uploaded for Master keys owned by other users. - process_
self_ πmaster_ key_ signatures - This function is part of
upload_keys_signatureand processes signatures uploaded for the Master key owned by the requester. - separate_
signatures π - Separates the received signed keys into the three cases (See
SignedKeysListandupload_keys_signature). - upload_
signatures_ πhandler - Handler for
POST /_matrix/client/v3/keys/signatures/upload(See https://spec.matrix.org/v1.16/client-server-api/#post_matrixclientv3keyssignaturesupload).
Type AliasesΒ§
- Failures π
- Map from user ID to a map from key ID (string) to failure.
- Signed
Keys πList - Since there are three possible signatures being uploaded (See
upload_keys_signature), we first separate the requestβs signed objects into the three possible cases, and return a 3-tuple containing the uploaded keys for each cases: ( Key ID and signed device keys belonging to the requester, Key ID and Master key for the key owned by the requester, A map from user ID to a map of key ID to cross-signing key )