fn check_cross_signing_key(
expected_user_id: &UserId,
expected_usage: &KeyUsage,
user_devices: &[Device],
key: &CrossSigningKey,
) -> Result<(), CrossSigningKeysError>Expand description
Performs various checks on a [CrossSigningKey].
§Errors
This function returns a InputJsonError error for any of the
following cases:
- The key is malformed in some way (e.g missing a field, does not have exactly one entry in its
keysfield, etc). - The cross-signing key’s id is the same as one of the user’s
device_ids(See https://spec.matrix.org/v1.16/client-server-api/#key-and-signature-security). - The user ID of the key does not match that of the authenticated user making the request.