fn process_device_keys_signatures(
signing_user_id: &UserId,
self_signing_key: Option<&CrossSigningKeyRow>,
stored_device_keys: &BTreeMap<OwnedDeviceId, DeviceKeysRow>,
new_device_keys: Vec<(String, DeviceKeys)>,
) -> Result<(Vec<ValidSignature>, BTreeMap<OwnedUserId, BTreeMap<String, Failure>>), SignaturesUploadError>Expand description
This function is part of upload_keys_signature and processes signatures
uploaded for device keys owned by the requester.
ยงFailures
Here are the cases that will produce failures to be returned by the endpoint:
- We do not have any stored self-signing key for the user. Such a key is necessary to check the
uploaded device signatures (See
upload_keys_signature). - We do not have the corresponding stored device keys object for an uploaded one (e.g it is not in the database, or the one we have is different).
- The actual signature is invalid (See https://spec.matrix.org/v1.16/appendices/#signing-json).