Skip to content

Commit d30d701

Browse files
committed
Bump sdk to 0e9ce0271
This moves a bunch of store types into the `types` submodule.
1 parent e3b691b commit d30d701

File tree

9 files changed

+36
-34
lines changed

9 files changed

+36
-34
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# UNRELEASED
22

3+
- Update matrix-rust-sdk to `0e9ce0271`.
4+
35
# matrix-sdk-crypto-wasm v15.0.0
46

57
- Update matrix-rusk-sdk to `0.12.0`, which includes:
@@ -41,7 +43,8 @@ Update matrix-sdk-crypto to `0.11.1`, which includes:
4143

4244
- Check the sender of an event matches owner of session, preventing sender
4345
spoofing by homeserver owners.
44-
[13c1d20](https://github.com/matrix-org/matrix-rust-sdk/commit/13c1d2048286bbabf5e7bc6b015aafee98f04d55) (High, [GHSA-x958-rvg6-956w](https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-x958-rvg6-956w)).
46+
[13c1d20](https://github.com/matrix-org/matrix-rust-sdk/commit/13c1d2048286bbabf5e7bc6b015aafee98f04d55) (
47+
High, [GHSA-x958-rvg6-956w](https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-x958-rvg6-956w)).
4548

4649
# matrix-sdk-crypto-wasm v14.2.0
4750

Cargo.lock

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ futures-util = "0.3.27"
6464
getrandom = { version = "0.3.0", features = ["wasm_js"] }
6565
http = "1.1.0"
6666
js-sys = "0.3.49"
67-
matrix-sdk-common = { version = "0.12.0", features = ["js"] }
68-
matrix-sdk-indexeddb = { version = "0.12.0", default-features = false, features = ["e2e-encryption"] }
69-
matrix-sdk-qrcode = { version = "0.12.0", optional = true }
67+
matrix-sdk-common = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "0e9ce0271", features = ["js"] }
68+
matrix-sdk-indexeddb = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "0e9ce0271", default-features = false, features = ["e2e-encryption"] }
69+
matrix-sdk-qrcode = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "0e9ce0271", optional = true }
7070
serde = "1.0.91"
7171
serde_json = "1.0.91"
7272
serde-wasm-bindgen = "0.6.5"
@@ -83,7 +83,8 @@ wasm-bindgen-test = "0.3.37"
8383
vergen-gitcl = { version = "1.0.0", features = ["build"] }
8484

8585
[dependencies.matrix-sdk-crypto]
86-
version = "0.12.0"
86+
git = "https://github.com/matrix-org/matrix-rust-sdk"
87+
rev = "0e9ce0271"
8788
default-features = false
8889
features = ["js", "automatic-room-key-forwarding"]
8990

src/backup.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use crate::impl_from_to_inner;
1010
#[derive(Debug, Clone)]
1111
#[wasm_bindgen]
1212
pub struct BackupDecryptionKey {
13-
pub(crate) inner: store::BackupDecryptionKey,
13+
pub(crate) inner: store::types::BackupDecryptionKey,
1414
}
1515

16-
impl_from_to_inner!(store::BackupDecryptionKey => BackupDecryptionKey);
16+
impl_from_to_inner!(store::types::BackupDecryptionKey => BackupDecryptionKey);
1717

1818
/// The public part of the backup key.
1919
#[derive(Debug, Clone)]
@@ -43,15 +43,15 @@ impl BackupDecryptionKey {
4343
#[wasm_bindgen(js_name = "createRandomKey")]
4444
pub fn create_random_key() -> BackupDecryptionKey {
4545
BackupDecryptionKey {
46-
inner: store::BackupDecryptionKey::new()
46+
inner: store::types::BackupDecryptionKey::new()
4747
.expect("Can't gather enough randomness to create a recovery key"),
4848
}
4949
}
5050

5151
/// Try to create a [`BackupDecryptionKey`] from a base 64 encoded string.
5252
#[wasm_bindgen(js_name = "fromBase64")]
5353
pub fn from_base64(key: String) -> Result<BackupDecryptionKey, JsError> {
54-
Ok(Self { inner: store::BackupDecryptionKey::from_base64(&key)? })
54+
Ok(Self { inner: store::types::BackupDecryptionKey::from_base64(&key)? })
5555
}
5656

5757
/// Convert the backup decryption key to a base 64 encoded string.
@@ -92,8 +92,8 @@ pub struct RoomKeyCounts {
9292
pub backed_up: f64,
9393
}
9494

95-
impl From<matrix_sdk_crypto::store::RoomKeyCounts> for RoomKeyCounts {
96-
fn from(inner: matrix_sdk_crypto::store::RoomKeyCounts) -> Self {
95+
impl From<store::types::RoomKeyCounts> for RoomKeyCounts {
96+
fn from(inner: store::types::RoomKeyCounts) -> Self {
9797
RoomKeyCounts {
9898
// There is no `TryFrom<usize> for f64`, so first downcast the usizes to u32, then back
9999
// up to f64

src/dehydrated_devices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use js_sys::{Array, JsString, Uint8Array};
66
use matrix_sdk_crypto::{
7-
dehydrated_devices, store::DehydratedDeviceKey as InnerDehydratedDeviceKey,
7+
dehydrated_devices, store::types::DehydratedDeviceKey as InnerDehydratedDeviceKey,
88
};
99
use wasm_bindgen::prelude::*;
1010

src/libolm_migration.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ use matrix_sdk_common::ruma::{
2222
};
2323
use matrix_sdk_crypto::{
2424
olm::PrivateCrossSigningIdentity,
25-
store::{BackupDecryptionKey, Changes, DynCryptoStore, PendingChanges},
25+
store::{
26+
types::{BackupDecryptionKey, Changes, PendingChanges},
27+
DynCryptoStore,
28+
},
2629
types::{EventEncryptionAlgorithm, SigningKeys},
2730
vodozemac,
2831
vodozemac::{Curve25519PublicKey, Ed25519PublicKey},

src/machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use matrix_sdk_common::ruma::{
1717
use matrix_sdk_crypto::{
1818
backups::MegolmV1BackupKey,
1919
olm::{BackedUpRoomKey, ExportedRoomKey},
20-
store::{DeviceChanges, IdentityChanges},
20+
store::types::{DeviceChanges, IdentityChanges},
2121
types::RoomKeyBackupInfo,
2222
CryptoStoreError, EncryptionSyncChanges, GossippedSecret,
2323
};
@@ -632,7 +632,7 @@ impl OlmMachine {
632632
user_signing_key: Option<String>,
633633
) -> Promise {
634634
let me = self.inner.clone();
635-
let export = matrix_sdk_crypto::store::CrossSigningKeyExport {
635+
let export = matrix_sdk_crypto::store::types::CrossSigningKeyExport {
636636
master_key,
637637
self_signing_key,
638638
user_signing_key,

src/store.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ impl IntoCryptoStore for StoreHandle {
142142
#[wasm_bindgen]
143143
#[derive(Debug)]
144144
pub struct CrossSigningKeyExport {
145-
pub(crate) inner: matrix_sdk_crypto::store::CrossSigningKeyExport,
145+
pub(crate) inner: matrix_sdk_crypto::store::types::CrossSigningKeyExport,
146146
}
147147

148-
impl_from_to_inner!(matrix_sdk_crypto::store::CrossSigningKeyExport => CrossSigningKeyExport);
148+
impl_from_to_inner!(matrix_sdk_crypto::store::types::CrossSigningKeyExport => CrossSigningKeyExport);
149149

150150
#[wasm_bindgen]
151151
impl CrossSigningKeyExport {
@@ -172,10 +172,10 @@ impl CrossSigningKeyExport {
172172
#[wasm_bindgen]
173173
#[derive(Debug)]
174174
pub struct RoomKeyInfo {
175-
pub(crate) inner: matrix_sdk_crypto::store::RoomKeyInfo,
175+
pub(crate) inner: matrix_sdk_crypto::store::types::RoomKeyInfo,
176176
}
177177

178-
impl_from_to_inner!(matrix_sdk_crypto::store::RoomKeyInfo => RoomKeyInfo);
178+
impl_from_to_inner!(matrix_sdk_crypto::store::types::RoomKeyInfo => RoomKeyInfo);
179179

180180
#[wasm_bindgen]
181181
impl RoomKeyInfo {
@@ -209,10 +209,10 @@ impl RoomKeyInfo {
209209
#[wasm_bindgen]
210210
#[derive(Debug)]
211211
pub struct RoomKeyWithheldInfo {
212-
pub(crate) inner: matrix_sdk_crypto::store::RoomKeyWithheldInfo,
212+
pub(crate) inner: matrix_sdk_crypto::store::types::RoomKeyWithheldInfo,
213213
}
214214

215-
impl_from_to_inner!(matrix_sdk_crypto::store::RoomKeyWithheldInfo => RoomKeyWithheldInfo);
215+
impl_from_to_inner!(matrix_sdk_crypto::store::types::RoomKeyWithheldInfo => RoomKeyWithheldInfo);
216216

217217
#[wasm_bindgen]
218218
impl RoomKeyWithheldInfo {

src/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ impl Default for RoomSettings {
335335
}
336336
}
337337

338-
impl From<matrix_sdk_crypto::store::RoomSettings> for RoomSettings {
339-
fn from(value: matrix_sdk_crypto::store::RoomSettings) -> Self {
338+
impl From<matrix_sdk_crypto::store::types::RoomSettings> for RoomSettings {
339+
fn from(value: matrix_sdk_crypto::store::types::RoomSettings) -> Self {
340340
Self {
341341
algorithm: value.algorithm.into(),
342342
only_allow_trusted_devices: value.only_allow_trusted_devices,
@@ -350,7 +350,7 @@ impl From<matrix_sdk_crypto::store::RoomSettings> for RoomSettings {
350350
}
351351
}
352352

353-
impl From<&RoomSettings> for matrix_sdk_crypto::store::RoomSettings {
353+
impl From<&RoomSettings> for matrix_sdk_crypto::store::types::RoomSettings {
354354
fn from(value: &RoomSettings) -> Self {
355355
Self {
356356
algorithm: value.algorithm.clone().into(),

0 commit comments

Comments
 (0)