-
Notifications
You must be signed in to change notification settings - Fork 354
Configurable sender trust checking on decrypting #3701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
bb7383d
e08dfab
9415308
67af31a
8253618
b7241c3
4d66828
c045d26
bfb8818
fb39a9e
1d4cefb
de60e6e
3731190
7803617
9b00de3
e309219
945f844
f0e9a18
7254e7e
3f7b840
ee9edf9
62531c8
b8b8c8b
a09ede9
73300aa
0a8acce
b0994a5
c53674b
773c8fe
4cbfd6b
65ba067
e85bf3b
14d1e07
e5c0c06
24a3ebb
a119d79
fa61076
368699a
0a1f80b
04c81e3
0e9b581
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,8 +69,34 @@ pub enum OlmError { | |||||
| have a valid Olm session with us" | ||||||
| )] | ||||||
| MissingSession, | ||||||
| #[error(transparent)] | ||||||
| /// The room key that should be shared was not due to an error. | ||||||
| KeyDistributionError(RoomKeyDistributionError), | ||||||
| } | ||||||
|
|
||||||
| /// Depending on the sharing strategy for room keys, the distribution of the | ||||||
| /// room key could fail. | ||||||
| #[derive(Error, Debug)] | ||||||
| pub enum RoomKeyDistributionError { | ||||||
| /// When encrypting using the IdentityBased strategy. | ||||||
| /// Will be thrown when sharing room keys when there is a new identity for a | ||||||
| /// user that has not been confirmed by the user. | ||||||
| /// Application should display identity changes to the user as soon as | ||||||
| /// possible to avoid hitting this case. If it happens the app might | ||||||
| /// just retry automatically after the identity change has been | ||||||
| /// notified, or offer option to cancel. | ||||||
| #[error("Encryption failed because there are key pinning violation, please re-pin or verify the problematic users")] | ||||||
| KeyPinningViolation(Vec<OwnedUserId>), | ||||||
|
|
||||||
| /// Cross-signing is required for encryption with invisible crypto | ||||||
| #[error("Encryption failed: Setup cross-signing on your account")] | ||||||
| CrossSigningNotSetup, | ||||||
| /// The current device needs to be verified when encrypting using the | ||||||
| /// IdentityBased strategy. Apps should prevent sending in the UI to | ||||||
| /// avoid hitting this case. | ||||||
| #[error("Encryption failed: Verify your device to send encrypted messages")] | ||||||
| SendingFromUnverifiedDevice, | ||||||
| } | ||||||
| /// Error representing a failure during a group encryption operation. | ||||||
| #[derive(Error, Debug)] | ||||||
| pub enum MegolmError { | ||||||
|
|
@@ -115,6 +141,19 @@ pub enum MegolmError { | |||||
| /// The storage layer returned an error. | ||||||
| #[error(transparent)] | ||||||
| Store(#[from] CryptoStoreError), | ||||||
|
|
||||||
| /// The sender's cross-signing identity isn't trusted | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(This should maybe also link to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, isn't it more "because the message could not be linked to a verified device" than specific to the sender's identity? |
||||||
| #[error("message quarantined because sender's cross-signing identity is not trusted")] | ||||||
| SenderCrossSigningUntrusted, | ||||||
|
|
||||||
| /// The sender's cross-signing identity has changed, and the change hasn't | ||||||
| /// been acknowledged | ||||||
| #[error("message quarantined because sender's cross-signing identity has changed")] | ||||||
| SenderCrossSigningIdentityChanged, | ||||||
|
|
||||||
| /// The sender's cross-signing identity is unknown | ||||||
| #[error("message quarantined because sender is unknown")] | ||||||
| SenderCrossSigningIdentityUnknown, | ||||||
| } | ||||||
|
|
||||||
| /// Error that occurs when decrypting an event that is malformed. | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.