matrix_sdk_test::test_json::keys_query_sets

Struct VerificationViolationTestData

Source
pub struct VerificationViolationTestData {}
Expand description

A set of /keys/query responses that were initially created to simulate when a user that was verified reset his keys and became unverified.

The local user (as returned by VerificationViolationTestData::own_id) is @alice:localhost. There are 2 other users: @bob:localhost (returned by VerificationViolationTestData::bob_id), and @carol:localhost (returned by VerificationViolationTestData::carol_id).

We provide two /keys/query responses for each of Bob and Carol: one signed by Alice, and one not signed.

Bob and Carol each have 2 devices, one signed by the owning user, and another one not cross-signed.

The /keys/query responses were generated using a local synapse.

Implementations§

Source§

impl VerificationViolationTestData

Source

pub const MASTER_KEY_PRIVATE_EXPORT: &'static str = "bSa0nVTocZArMzL7OLmeFUIVF4ycp64rrkVMgqOYg6Y"

Secret part of Alice’s master cross-signing key.

Exported from Element-Web with the following console snippet:

(await mxMatrixClientPeg.get().getCrypto().olmMachine.exportCrossSigningKeys()).masterKey
Source

pub const SELF_SIGNING_KEY_PRIVATE_EXPORT: &'static str = "MQ7b3MDXvOEMDvIOWkuH1XCNUyqBLqbdd1bT00p8HPU"

Secret part of Alice’s self cross-signing key.

Exported from Element-Web with the following console snippet:

(await mxMatrixClientPeg.get().getCrypto().olmMachine.exportCrossSigningKeys()).self_signing_key
Source

pub const USER_SIGNING_KEY_PRIVATE_EXPORT: &'static str = "v77s+TlT5/NbcQym2B7Rwf20HOAhyInF2p1ZUYDPtow"

Secret part of Alice’s user cross-signing key.

Exported from Element-Web with the following console snippet:

(await mxMatrixClientPeg.get().getCrypto().olmMachine.exportCrossSigningKeys()).userSigningKey
Source

pub fn own_id() -> &'static UserId

Alice’s user ID.

Alice is the “local user” for this test data set.

Source

pub fn bob_id() -> &'static UserId

Bob’s user ID.

Source

pub fn carol_id() -> &'static UserId

Carol’s user ID.

Source

pub fn own_keys_query_response_1() -> KeyQueryResponse

/keys/query response for Alice, containing the public cross-signing keys.

Source

pub fn own_keys_query_response_2() -> KeyQueryResponse

A second /keys/query response for Alice, containing a different set of public cross-signing keys.

This response was lifted from the test data set from matrix-js-sdk.

Source

pub fn own_unsigned_device_id() -> OwnedDeviceId

Device ID of the device returned by Self::own_unsigned_device_keys.

Source

pub fn own_unsigned_device_keys() -> (OwnedDeviceId, Raw<DeviceKeys>)

Device-keys response for a device belonging to Alice, which has not been signed by her identity. This can be used as part of a /keys/query response.

For convenience, returns a tuple (<device id>, <device keys>). The device id is also returned by Self::own_unsigned_device_id.

Source

pub fn own_signed_device_id() -> OwnedDeviceId

Device ID of the device returned by Self::own_signed_device_keys.

Source

pub fn own_signed_device_keys() -> (OwnedDeviceId, Raw<DeviceKeys>)

Device-keys response for a device belonging to Alice, which has been signed by her identity. This can be used as part of a /keys/query response.

For convenience, returns a tuple (<device id>, <device keys>). The device id is also returned by Self::own_signed_device_id.

Source

pub fn bob_keys_query_response_signed() -> KeyQueryResponse

/keys/query response for Bob, signed by Alice’s identity.

Contains Bob’s cross-signing identity, and two devices: Self::bob_device_1_id (signed by the cross-signing identity), and Self::bob_device_2_id (not cross-signed).

Source

pub fn bob_device_1_id() -> &'static DeviceId

Device ID of Bob’s first device.

This device is cross-signed in Self::bob_keys_query_response_signed but not in Self::bob_keys_query_response_rotated.

Source

pub fn bob_device_2_id() -> &'static DeviceId

Device ID of Bob’s second device.

This device is cross-signed in Self::bob_keys_query_response_rotated but not in Self::bob_keys_query_response_signed.

Source

pub fn bob_keys_query_response_rotated() -> KeyQueryResponse

/keys/query response for Bob, signed by Alice’s identity.

In contrast to Self::bob_keys_query_response_signed, Bob has a new cross-signing identity, which is not signed by Alice. As well as the new identity, still contains the two devices Self::bob_device_1_id (signed only by the old cross-signing identity), and Self::bob_device_2_id (properly signed by the new identity).

Source

pub fn carol_signed_device_id() -> &'static DeviceId

Device ID of Carol’s signed device.

The device is returned as part of Self::carol_keys_query_response_signed and Self::carol_keys_query_response_unsigned.

Source

pub fn carol_unsigned_device_id() -> &'static DeviceId

Device ID of Carol’s unsigned device.

The device is returned as part of Self::carol_keys_query_response_signed and Self::carol_keys_query_response_unsigned.

Source

pub fn carol_keys_query_response_unsigned() -> KeyQueryResponse

/keys/query response for Carol, not yet verified by any other user.

Contains Carol’s cross-signing identity, and two devices: Self::carol_signed_device_id (signed by the cross-signing identity), and Self::carol_unsigned_device_id (not cross-signed).

Source

pub fn carol_keys_query_response_signed() -> KeyQueryResponse

/keys/query response for Carol, signed by Alice.

Contains the same data as Self::carol_keys_query_response_unsigned, but Carol’s identity is now signed by Alice’s user-signing key.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

Source§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
Source§

fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
Source§

fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<>
Source§

fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> SendOutsideWasm for T
where T: Send,

Source§

impl<T> SyncOutsideWasm for T
where T: Sync,