fn separate_signatures(
request_user_id: &UserId,
signed_keys: &BTreeMap<OwnedUserId, SignedKeys>,
) -> Result<(Vec<(String, DeviceKeys)>, Option<(String, CrossSigningKey)>, BTreeMap<OwnedUserId, BTreeMap<String, CrossSigningKey>>), SignaturesUploadError>Expand description
Separates the received signed keys into the three cases (See
SignedKeysList and upload_keys_signature).
ยงErrors
This function errors if:
- The signed object is not a [CrossSigningKey] nor a [DeviceKeys].
- The signed key is a device keys that is not owned by the requesting user.
- The signed key is a cross-signing key but its
usagefield does not contain exactly one entry. - The signed key is a cross-signing key that is not a Master key.