From f51cf16b18f3b3060c76aeeccf9c99db0d0312bd Mon Sep 17 00:00:00 2001 From: Skye Elliot Date: Fri, 3 Jul 2026 12:31:07 +0100 Subject: [PATCH 1/4] refactor(crypto): Accept impl Into in Signatures::add_signature Co-Authored-By: Richard van der Hoff Signed-off-by: Skye Elliot --- crates/matrix-sdk-crypto/src/types/signatures/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/matrix-sdk-crypto/src/types/signatures/mod.rs b/crates/matrix-sdk-crypto/src/types/signatures/mod.rs index 000169eafb8..ca8b75750ed 100644 --- a/crates/matrix-sdk-crypto/src/types/signatures/mod.rs +++ b/crates/matrix-sdk-crypto/src/types/signatures/mod.rs @@ -52,7 +52,7 @@ impl Signatures { &mut self, signer: OwnedUserId, key_id: OwnedDeviceKeyId, - signature: Ed25519Signature, + signature: impl Into, ) -> Option> { self.0.entry(signer).or_default().insert(key_id, Ok(signature.into())) } From cd5692088fb0d77709fbe2ffe8ecc6a8cdb20c50 Mon Sep 17 00:00:00 2001 From: Skye Elliot Date: Fri, 3 Jul 2026 12:47:28 +0100 Subject: [PATCH 2/4] refactor(crypto): Make `OlmMachine::bootstrap_cross_signing` fallible Co-Authored-By: Hubert Chathi Co-Authored-By: Richard van der Hoff Signed-off-by: Skye Elliot --- bindings/matrix-sdk-crypto-ffi/src/error.rs | 18 +++++++++++++++++ bindings/matrix-sdk-crypto-ffi/src/lib.rs | 3 ++- bindings/matrix-sdk-crypto-ffi/src/machine.rs | 15 ++++++++------ .../src/identities/room_identity_state.rs | 4 ++-- .../matrix-sdk-crypto/src/identities/user.rs | 2 +- crates/matrix-sdk-crypto/src/lib.rs | 3 ++- crates/matrix-sdk-crypto/src/machine/mod.rs | 20 +++++++++++++++++-- crates/matrix-sdk-crypto/src/olm/account.rs | 14 ++++++------- .../src/olm/group_sessions/sender_data.rs | 2 +- .../olm/group_sessions/sender_data_finder.rs | 2 +- .../matrix-sdk-crypto/src/olm/signing/mod.rs | 18 ++++++++--------- .../matrix-sdk-crypto/src/verification/mod.rs | 4 ++-- crates/matrix-sdk/src/error.rs | 18 ++++++++++++++++- 13 files changed, 89 insertions(+), 34 deletions(-) diff --git a/bindings/matrix-sdk-crypto-ffi/src/error.rs b/bindings/matrix-sdk-crypto-ffi/src/error.rs index 36d9458f32a..021b1a50335 100644 --- a/bindings/matrix-sdk-crypto-ffi/src/error.rs +++ b/bindings/matrix-sdk-crypto-ffi/src/error.rs @@ -76,6 +76,14 @@ pub enum DecryptionError { Store { error: String }, } +#[derive(Debug, thiserror::Error, uniffi::Error)] +pub enum BootstrapCrossSigningError { + #[error(transparent)] + CryptoStore(CryptoStoreError), + #[error(transparent)] + Signature(SignatureError), +} + /// Error describing what went wrong when exporting a [`SecretsBundle`]. /// /// The [`SecretsBundle`] can only be exported if we have all cross-signing @@ -149,6 +157,16 @@ impl From for DecryptionError { } } +impl From for BootstrapCrossSigningError { + fn from(err: matrix_sdk_crypto::BootstrapCrossSigningError) -> Self { + use matrix_sdk_crypto::BootstrapCrossSigningError as BCSE; + match err { + BCSE::CryptoStore(e) => Self::CryptoStore(e.into()), + BCSE::Signature(e) => Self::Signature(e.into()), + } + } +} + #[cfg(test)] mod tests { use assert_matches2::assert_let; diff --git a/bindings/matrix-sdk-crypto-ffi/src/lib.rs b/bindings/matrix-sdk-crypto-ffi/src/lib.rs index 5d7a6d0c83c..43d533ad38f 100644 --- a/bindings/matrix-sdk-crypto-ffi/src/lib.rs +++ b/bindings/matrix-sdk-crypto-ffi/src/lib.rs @@ -28,7 +28,8 @@ pub use backup_recovery_key::{ }; pub use device::Device; pub use error::{ - CryptoStoreError, DecryptionError, KeyImportError, SecretImportError, SignatureError, + BootstrapCrossSigningError, CryptoStoreError, DecryptionError, KeyImportError, + SecretImportError, SignatureError, }; use js_int::UInt; pub use logger::{Logger, set_logger}; diff --git a/bindings/matrix-sdk-crypto-ffi/src/machine.rs b/bindings/matrix-sdk-crypto-ffi/src/machine.rs index 0c50e4c02c2..bbf6a696942 100644 --- a/bindings/matrix-sdk-crypto-ffi/src/machine.rs +++ b/bindings/matrix-sdk-crypto-ffi/src/machine.rs @@ -52,11 +52,12 @@ use tokio::runtime::Runtime; use zeroize::Zeroize; use crate::{ - BackupKeys, BackupRecoveryKey, BootstrapCrossSigningResult, CrossSigningKeyExport, - CrossSigningStatus, DecodeError, DecryptedEvent, Device, DeviceLists, EncryptionSettings, - EventEncryptionAlgorithm, KeyImportError, KeysImportResult, MegolmV1BackupKey, - ProgressListener, Request, RequestType, RequestVerificationResult, RoomKeyCounts, RoomSettings, - Sas, SignatureUploadRequest, StartSasResult, UserIdentity, Verification, VerificationRequest, + BackupKeys, BackupRecoveryKey, BootstrapCrossSigningError, BootstrapCrossSigningResult, + CrossSigningKeyExport, CrossSigningStatus, DecodeError, DecryptedEvent, Device, DeviceLists, + EncryptionSettings, EventEncryptionAlgorithm, KeyImportError, KeysImportResult, + MegolmV1BackupKey, ProgressListener, Request, RequestType, RequestVerificationResult, + RoomKeyCounts, RoomSettings, Sas, SignatureUploadRequest, StartSasResult, UserIdentity, + Verification, VerificationRequest, dehydrated_devices::DehydratedDevices, error::{ CryptoStoreError, DecryptionError, SecretImportError, SecretsBundleExportError, @@ -1376,7 +1377,9 @@ impl OlmMachine { /// Create a new private cross signing identity and create a request to /// upload the public part of it to the server. - pub fn bootstrap_cross_signing(&self) -> Result { + pub fn bootstrap_cross_signing( + &self, + ) -> Result { Ok(self.runtime.block_on(self.inner.bootstrap_cross_signing(true))?.into()) } diff --git a/crates/matrix-sdk-crypto/src/identities/room_identity_state.rs b/crates/matrix-sdk-crypto/src/identities/room_identity_state.rs index 3fdcd11f9ea..313e0682d8c 100644 --- a/crates/matrix-sdk-crypto/src/identities/room_identity_state.rs +++ b/crates/matrix-sdk-crypto/src/identities/room_identity_state.rs @@ -1112,7 +1112,7 @@ mod tests { let account = Account::with_device_id(user_id, &device_id); let private_identity = - Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account))); + Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account).unwrap())); let other_user_identity_data = OtherUserIdentityData::from_private(&*private_identity.lock().await).await; @@ -1152,7 +1152,7 @@ mod tests { let account = Account::with_device_id(user_id, &device_id); let private_identity = - Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account))); + Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account).unwrap())); let own_user_identity_data = OwnUserIdentityData::from_private(&*private_identity.lock().await).await; diff --git a/crates/matrix-sdk-crypto/src/identities/user.rs b/crates/matrix-sdk-crypto/src/identities/user.rs index 591f270c735..70c93440452 100644 --- a/crates/matrix-sdk-crypto/src/identities/user.rs +++ b/crates/matrix-sdk-crypto/src/identities/user.rs @@ -2023,7 +2023,7 @@ pub(crate) mod tests { * Creates a new private user identity for the account. */ fn get_verification_machine(account: &Account) -> VerificationMachine { - let private_identity = PrivateCrossSigningIdentity::for_account(account); + let private_identity = PrivateCrossSigningIdentity::for_account(account).unwrap(); VerificationMachine::new( account.static_data().clone(), Arc::new(Mutex::new(private_identity)), diff --git a/crates/matrix-sdk-crypto/src/lib.rs b/crates/matrix-sdk-crypto/src/lib.rs index c597f0d2ad2..b5bb02dac07 100644 --- a/crates/matrix-sdk-crypto/src/lib.rs +++ b/crates/matrix-sdk-crypto/src/lib.rs @@ -91,7 +91,8 @@ pub use identities::{ OwnUserIdentityData, UserDevices, UserIdentity, UserIdentityData, }; pub use machine::{ - CrossSigningBootstrapRequests, EncryptionSyncChanges, OlmMachine, OlmMachineBuilder, + BootstrapCrossSigningError, CrossSigningBootstrapRequests, EncryptionSyncChanges, OlmMachine, + OlmMachineBuilder, }; use matrix_sdk_common::deserialized_responses::{DecryptedRoomEvent, UnableToDecryptInfo}; #[cfg(feature = "qrcode")] diff --git a/crates/matrix-sdk-crypto/src/machine/mod.rs b/crates/matrix-sdk-crypto/src/machine/mod.rs index 2f36dc56278..4e7e3ad398d 100644 --- a/crates/matrix-sdk-crypto/src/machine/mod.rs +++ b/crates/matrix-sdk-crypto/src/machine/mod.rs @@ -717,7 +717,7 @@ impl OlmMachine { pub async fn bootstrap_cross_signing( &self, reset: bool, - ) -> StoreResult { + ) -> Result { // Don't hold the lock, otherwise we might deadlock in // `bootstrap_cross_signing()` on `account` if a sync task is already // running (which locks `account`), or we will deadlock @@ -731,7 +731,7 @@ impl OlmMachine { let (identity, upload_signing_keys_req, upload_signatures_req) = { let cache = self.inner.store.cache().await?; let account = cache.account().await?; - account.bootstrap_cross_signing().await + account.bootstrap_cross_signing().await? }; let public = identity.to_public_identity().await.expect( @@ -3193,6 +3193,22 @@ pub struct CrossSigningBootstrapRequests { pub upload_signatures_req: UploadSignaturesRequest, } +/// An error that can occur during [`OlmMachine::bootstrap_cross_signing`]: +/// +/// * because a failure with the store occurred, or +/// +/// * because the new cross-signing identity could not be signed. +#[derive(Debug, thiserror::Error)] +pub enum BootstrapCrossSigningError { + /// A failure with the store occurred. + #[error(transparent)] + CryptoStore(#[from] CryptoStoreError), + + /// The new cross-signing identity could not be signed + #[error(transparent)] + Signature(#[from] SignatureError), +} + /// Data contained from a sync response and that needs to be processed by the /// OlmMachine. #[derive(Debug)] diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index ba7b5fc3b48..4df1cbb03bb 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -817,17 +817,17 @@ impl Account { /// this device to the server. pub async fn bootstrap_cross_signing( &self, - ) -> (PrivateCrossSigningIdentity, UploadSigningKeysRequest, SignatureUploadRequest) { - let identity = PrivateCrossSigningIdentity::for_account(self); + ) -> Result< + (PrivateCrossSigningIdentity, UploadSigningKeysRequest, SignatureUploadRequest), + SignatureError, + > { + let identity = PrivateCrossSigningIdentity::for_account(self)?; - let signature_request = identity - .sign_account(self.static_data()) - .await - .expect("Can't sign own device with new cross signing keys"); + let signature_request = identity.sign_account(self.static_data()).await?; let upload_request = identity.as_upload_request().await; - (identity, upload_request, signature_request) + Ok((identity, upload_request, signature_request)) } /// Sign the given CrossSigning Key in place diff --git a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data.rs b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data.rs index d34b39209f5..6e559abfeb0 100644 --- a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data.rs +++ b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data.rs @@ -796,7 +796,7 @@ mod tests { async fn test_from_device_for_verified_user() { let alice_account = Account::with_device_id(user_id!("@alice:example.com"), device_id!("ALICE_DEVICE")); - let alice_identity = PrivateCrossSigningIdentity::for_account(&alice_account); + let alice_identity = PrivateCrossSigningIdentity::for_account(&alice_account).unwrap(); let bob_identity = PrivateCrossSigningIdentity::new(owned_user_id!("@bob:example.com")); let bob_account = diff --git a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs index c60b766718d..e233fdcc65c 100644 --- a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs +++ b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs @@ -914,7 +914,7 @@ mod tests { let account = Account::with_device_id(user_id, device_id); let user_id = user_id.to_owned(); let private_identity = - Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account))); + Arc::new(Mutex::new(PrivateCrossSigningIdentity::for_account(&account).unwrap())); let user_identity = create_user_identity(&*private_identity.lock().await, is_me, is_verified, signer) diff --git a/crates/matrix-sdk-crypto/src/olm/signing/mod.rs b/crates/matrix-sdk-crypto/src/olm/signing/mod.rs index 7a86b518a7f..30235efcf7d 100644 --- a/crates/matrix-sdk-crypto/src/olm/signing/mod.rs +++ b/crates/matrix-sdk-crypto/src/olm/signing/mod.rs @@ -564,14 +564,14 @@ impl PrivateCrossSigningIdentity { * * * `account` - The Olm account that is creating the new identity. */ - pub(crate) fn for_account(account: &Account) -> PrivateCrossSigningIdentity { + pub(crate) fn for_account( + account: &Account, + ) -> Result { let mut master = MasterSigning::new(account.user_id().into()); - account - .sign_cross_signing_key(master.public_key_mut().as_mut()) - .expect("Can't sign our freshly created master key with our account"); + account.sign_cross_signing_key(master.public_key_mut().as_mut())?; - Self::new_helper(account.user_id(), master) + Ok(Self::new_helper(account.user_id(), master)) } #[cfg(any(test, feature = "testing"))] @@ -749,7 +749,7 @@ mod tests { #[async_test] async fn test_private_identity_signed_by_account() { let account = Account::with_device_id(user_id(), device_id!("DEVICEID")); - let identity = PrivateCrossSigningIdentity::for_account(&account); + let identity = PrivateCrossSigningIdentity::for_account(&account).unwrap(); let master = identity.master_key.lock().await; let master = master.as_ref().unwrap(); @@ -772,7 +772,7 @@ mod tests { #[async_test] async fn test_sign_device() { let account = Account::with_device_id(user_id(), device_id!("DEVICEID")); - let identity = PrivateCrossSigningIdentity::for_account(&account); + let identity = PrivateCrossSigningIdentity::for_account(&account).unwrap(); let mut device = DeviceData::from_account(&account); let self_signing = identity.self_signing_key.lock().await; @@ -789,11 +789,11 @@ mod tests { #[async_test] async fn test_sign_user_identity() { let account = Account::with_device_id(user_id(), device_id!("DEVICEID")); - let identity = PrivateCrossSigningIdentity::for_account(&account); + let identity = PrivateCrossSigningIdentity::for_account(&account).unwrap(); let bob_account = Account::with_device_id(user_id!("@bob:localhost"), device_id!("DEVICEID")); - let bob_private = PrivateCrossSigningIdentity::for_account(&bob_account); + let bob_private = PrivateCrossSigningIdentity::for_account(&bob_account).unwrap(); let mut bob_public = OtherUserIdentityData::from_private(&bob_private).await; let user_signing = identity.user_signing_key.lock().await; diff --git a/crates/matrix-sdk-crypto/src/verification/mod.rs b/crates/matrix-sdk-crypto/src/verification/mod.rs index 00ad8dda987..5606f6804fa 100644 --- a/crates/matrix-sdk-crypto/src/verification/mod.rs +++ b/crates/matrix-sdk-crypto/src/verification/mod.rs @@ -830,12 +830,12 @@ pub(crate) mod tests { pub(crate) async fn setup_stores() -> (Account, VerificationStore, Account, VerificationStore) { let alice = Account::with_device_id(alice_id(), alice_device_id()); let alice_store = MemoryStore::new(); - let alice_private_identity = PrivateCrossSigningIdentity::for_account(&alice); + let alice_private_identity = PrivateCrossSigningIdentity::for_account(&alice).unwrap(); let alice_private_identity = Mutex::new(alice_private_identity); let bob = Account::with_device_id(bob_id(), bob_device_id()); let bob_store = MemoryStore::new(); - let bob_private_identity = PrivateCrossSigningIdentity::for_account(&bob); + let bob_private_identity = PrivateCrossSigningIdentity::for_account(&bob).unwrap(); let bob_private_identity = Mutex::new(bob_private_identity); let alice_public_identity = diff --git a/crates/matrix-sdk/src/error.rs b/crates/matrix-sdk/src/error.rs index f2b2269cb84..1ead9ec8e81 100644 --- a/crates/matrix-sdk/src/error.rs +++ b/crates/matrix-sdk/src/error.rs @@ -22,7 +22,8 @@ use http::StatusCode; use matrix_sdk_base::crypto::ScanError; #[cfg(feature = "e2e-encryption")] use matrix_sdk_base::crypto::{ - CryptoStoreError, DecryptorError, KeyExportError, MegolmError, OlmError, + BootstrapCrossSigningError, CryptoStoreError, DecryptorError, KeyExportError, MegolmError, + OlmError, SignatureError, }; use matrix_sdk_base::{ Error as SdkBaseError, QueueWedgeError, RoomState, StoreError, @@ -302,6 +303,11 @@ pub enum Error { #[error(transparent)] DecryptorError(#[from] DecryptorError), + /// An error occurred during signing or verifying. + #[cfg(feature = "e2e-encryption")] + #[error(transparent)] + SignatureError(#[from] SignatureError), + /// An error occurred in the state store. #[error(transparent)] StateStore(Box), @@ -526,6 +532,16 @@ impl From for Error { } } +#[cfg(feature = "e2e-encryption")] +impl From for Error { + fn from(error: BootstrapCrossSigningError) -> Self { + match error { + BootstrapCrossSigningError::CryptoStore(e) => e.into(), + BootstrapCrossSigningError::Signature(e) => e.into(), + } + } +} + /// Error for the room key importing functionality. #[cfg(feature = "e2e-encryption")] #[derive(Error, Debug)] From 3bedac0e912adb3fc442005d8ee0ff254e8a4b82 Mon Sep 17 00:00:00 2001 From: Skye Elliot Date: Fri, 3 Jul 2026 12:56:30 +0100 Subject: [PATCH 3/4] refactor(crypto): Inline Account::sign_master_key Co-Authored-By: Richard van der Hoff Co-Authored-By: Andy Balaam Signed-off-by: Skye Elliot --- .../matrix-sdk-crypto/src/identities/user.rs | 23 +++++++++++++--- crates/matrix-sdk-crypto/src/olm/account.rs | 26 ++----------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/crates/matrix-sdk-crypto/src/identities/user.rs b/crates/matrix-sdk-crypto/src/identities/user.rs index 70c93440452..706c5c3f850 100644 --- a/crates/matrix-sdk-crypto/src/identities/user.rs +++ b/crates/matrix-sdk-crypto/src/identities/user.rs @@ -25,7 +25,7 @@ use as_variant::as_variant; use matrix_sdk_common::locks::RwLock; use ruma::{ DeviceId, EventId, OwnedDeviceId, OwnedUserId, RoomId, UserId, - api::client::keys::upload_signatures::v3::Request as SignatureUploadRequest, + api::client::keys::upload_signatures::v3::{Request as SignatureUploadRequest, SignedKeys}, events::{key::verification::VerificationMethod, room::message::MessageType}, }; use serde::{Deserialize, Deserializer, Serialize}; @@ -40,7 +40,8 @@ use crate::{ types::{Changes, IdentityChanges}, }, types::{ - MasterPubkey, SelfSigningPubkey, UserSigningPubkey, requests::OutgoingVerificationRequest, + CrossSigningKey, MasterPubkey, SelfSigningPubkey, UserSigningPubkey, + requests::OutgoingVerificationRequest, }, verification::VerificationMachine, }; @@ -230,7 +231,23 @@ impl OwnUserIdentity { let cache = self.store.cache().await?; let account = cache.account().await?; - account.sign_master_key(&self.master_key) + + let public_key = self + .master_key + .get_first_key() + .ok_or(SignatureError::MissingSigningKey)? + .to_base64() + .into(); + + let mut cross_signing_key: CrossSigningKey = (*self.master_key).as_ref().clone(); + cross_signing_key.signatures.clear(); + account.sign_cross_signing_key(&mut cross_signing_key)?; + + let mut user_signed_keys = SignedKeys::new(); + user_signed_keys.add_cross_signing_keys(public_key, cross_signing_key.to_raw()); + + let signed_keys = [(self.user_id().to_owned(), user_signed_keys)].into(); + Ok(SignatureUploadRequest::new(signed_keys)) } /// Send a verification request to our other devices. diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index 4df1cbb03bb..e460d71153d 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -31,10 +31,7 @@ use ruma::{ OwnedUserId, RoomId, SecondsSinceUnixEpoch, UInt, UserId, api::client::{ dehydrated_device::{DehydratedDeviceData, DehydratedDeviceV2}, - keys::{ - upload_keys, - upload_signatures::v3::{Request as SignatureUploadRequest, SignedKeys}, - }, + keys::{upload_keys, upload_signatures::v3::Request as SignatureUploadRequest}, }, canonical_json::to_canonical_value, events::{AnyToDeviceEvent, room::history_visibility::HistoryVisibility}, @@ -70,7 +67,7 @@ use crate::{ types::{Changes, DeviceChanges}, }, types::{ - CrossSigningKey, DeviceKeys, EventEncryptionAlgorithm, MasterPubkey, OneTimeKey, SignedKey, + CrossSigningKey, DeviceKeys, EventEncryptionAlgorithm, OneTimeKey, SignedKey, events::{ olm_v1::AnyDecryptedOlmEvent, room::encrypted::{ @@ -846,25 +843,6 @@ impl Account { Ok(()) } - /// Sign the given Master Key - pub fn sign_master_key( - &self, - master_key: &MasterPubkey, - ) -> Result { - let public_key = - master_key.get_first_key().ok_or(SignatureError::MissingSigningKey)?.to_base64().into(); - - let mut cross_signing_key: CrossSigningKey = master_key.as_ref().clone(); - cross_signing_key.signatures.clear(); - self.sign_cross_signing_key(&mut cross_signing_key)?; - - let mut user_signed_keys = SignedKeys::new(); - user_signed_keys.add_cross_signing_keys(public_key, cross_signing_key.to_raw()); - - let signed_keys = [(self.user_id().to_owned(), user_signed_keys)].into(); - Ok(SignatureUploadRequest::new(signed_keys)) - } - /// Convert a JSON value to the canonical representation and sign the JSON /// string. /// From 63b49878f82dcf7c25930affb50109206f77f943 Mon Sep 17 00:00:00 2001 From: Skye Elliot Date: Fri, 3 Jul 2026 14:47:51 +0100 Subject: [PATCH 4/4] docs: Add changelog entries Signed-off-by: Skye Elliot --- bindings/matrix-sdk-ffi/changelog.d/6715.changed.md | 4 ++++ crates/matrix-sdk-crypto/changelog.d/6715.changed | 9 +++++++++ crates/matrix-sdk/changelog.d/6715.added.md | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 bindings/matrix-sdk-ffi/changelog.d/6715.changed.md create mode 100644 crates/matrix-sdk-crypto/changelog.d/6715.changed create mode 100644 crates/matrix-sdk/changelog.d/6715.added.md diff --git a/bindings/matrix-sdk-ffi/changelog.d/6715.changed.md b/bindings/matrix-sdk-ffi/changelog.d/6715.changed.md new file mode 100644 index 00000000000..07f1300ba9d --- /dev/null +++ b/bindings/matrix-sdk-ffi/changelog.d/6715.changed.md @@ -0,0 +1,4 @@ +[**breaking**] Adjust `OlmMachine::bootstrap_cross_signing` to return +a new `BootstrapCrossSigningError` enum covering both crypto store +and signing failures. This replaces the previous `CryptoStoreError` +return type. diff --git a/crates/matrix-sdk-crypto/changelog.d/6715.changed b/crates/matrix-sdk-crypto/changelog.d/6715.changed new file mode 100644 index 00000000000..dd941774ef6 --- /dev/null +++ b/crates/matrix-sdk-crypto/changelog.d/6715.changed @@ -0,0 +1,9 @@ +Accept `impl Into` in `Signatures::add_signature`. + +[**breaking**] Make `OlmMachine::bootstrap_cross_signing` fallible to +allow future signing implementations to produce errors. Further +introduces `CrossSigningBootstrapError` to enumerate possible failure +cases. + +[**breaking**] Removed `Account::sign_master_key`, as the master key +is signed automatically when calling `OwnUserIdentity::verify` diff --git a/crates/matrix-sdk/changelog.d/6715.added.md b/crates/matrix-sdk/changelog.d/6715.added.md new file mode 100644 index 00000000000..2c17667054f --- /dev/null +++ b/crates/matrix-sdk/changelog.d/6715.added.md @@ -0,0 +1,2 @@ +Added a new top-level `Error` variant, `SignatureError` representing +errors that occurred signing or verifying cryptographic data.