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
impl VerificationViolationTestData
Sourcepub const MASTER_KEY_PRIVATE_EXPORT: &'static str = "bSa0nVTocZArMzL7OLmeFUIVF4ycp64rrkVMgqOYg6Y"
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
Sourcepub const SELF_SIGNING_KEY_PRIVATE_EXPORT: &'static str = "MQ7b3MDXvOEMDvIOWkuH1XCNUyqBLqbdd1bT00p8HPU"
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
Sourcepub const USER_SIGNING_KEY_PRIVATE_EXPORT: &'static str = "v77s+TlT5/NbcQym2B7Rwf20HOAhyInF2p1ZUYDPtow"
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
Sourcepub fn own_id() -> &'static UserId
pub fn own_id() -> &'static UserId
Alice’s user ID.
Alice is the “local user” for this test data set.
Sourcepub fn own_keys_query_response_1() -> KeyQueryResponse
pub fn own_keys_query_response_1() -> KeyQueryResponse
/keys/query
response for Alice, containing the public cross-signing
keys.
Sourcepub fn own_keys_query_response_2() -> KeyQueryResponse
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
.
Sourcepub fn own_unsigned_device_id() -> OwnedDeviceId
pub fn own_unsigned_device_id() -> OwnedDeviceId
Device ID of the device returned by Self::own_unsigned_device_keys
.
Sourcepub fn own_unsigned_device_keys() -> (OwnedDeviceId, Raw<DeviceKeys>)
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
.
Sourcepub fn own_signed_device_id() -> OwnedDeviceId
pub fn own_signed_device_id() -> OwnedDeviceId
Device ID of the device returned by Self::own_signed_device_keys
.
Sourcepub fn own_signed_device_keys() -> (OwnedDeviceId, Raw<DeviceKeys>)
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
.
Sourcepub fn bob_keys_query_response_signed() -> KeyQueryResponse
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).
Sourcepub fn bob_device_1_id() -> &'static DeviceId
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
.
Sourcepub fn bob_device_2_id() -> &'static DeviceId
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
.
Sourcepub fn bob_keys_query_response_rotated() -> KeyQueryResponse
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).
Sourcepub fn carol_signed_device_id() -> &'static DeviceId
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
.
Sourcepub fn carol_unsigned_device_id() -> &'static DeviceId
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
.
Sourcepub fn carol_keys_query_response_unsigned() -> KeyQueryResponse
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).
Sourcepub fn carol_keys_query_response_signed() -> KeyQueryResponse
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§
impl Freeze for VerificationViolationTestData
impl RefUnwindSafe for VerificationViolationTestData
impl Send for VerificationViolationTestData
impl Sync for VerificationViolationTestData
impl Unpin for VerificationViolationTestData
impl UnwindSafe for VerificationViolationTestData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>