From 17097f4d420160bbc35b3d181f426fdf82fe872a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 21 Jun 2021 16:42:38 +0200 Subject: [PATCH 1/3] matrix-sdk: Upgrade our deps --- matrix_qrcode/Cargo.toml | 4 +- matrix_sdk/Cargo.toml | 36 +++++++++--------- .../examples/wasm_command_bot/Cargo.toml | 8 ++-- matrix_sdk_base/Cargo.toml | 32 ++++++++-------- matrix_sdk_common/Cargo.toml | 10 ++--- matrix_sdk_crypto/Cargo.toml | 38 +++++++++---------- .../src/file_encryption/attachments.rs | 15 +++++--- .../src/file_encryption/key_export.rs | 25 ++++++++---- matrix_sdk_test/Cargo.toml | 6 +-- 9 files changed, 94 insertions(+), 80 deletions(-) diff --git a/matrix_qrcode/Cargo.toml b/matrix_qrcode/Cargo.toml index 3932e4bf..69d87fa0 100644 --- a/matrix_qrcode/Cargo.toml +++ b/matrix_qrcode/Cargo.toml @@ -19,6 +19,6 @@ base64 = "0.13.0" byteorder = "1.4.3" image = { version = "0.23.14", optional = true } qrcode = { version = "0.12.0", default-features = false } -rqrr = { version = "0.3.2" , optional = true } +rqrr = { version = "0.3.2", optional = true } ruma-identifiers = { version = "0.19.3", git = "https://github.com/ruma/ruma", rev = "d73ab8add" } -thiserror = "1.0.24" +thiserror = "1.0.25" diff --git a/matrix_sdk/Cargo.toml b/matrix_sdk/Cargo.toml index a4cec562..ef107277 100644 --- a/matrix_sdk/Cargo.toml +++ b/matrix_sdk/Cargo.toml @@ -32,15 +32,15 @@ docs = ["encryption", "sled_cryptostore", "sled_state_store", "sso_login"] [dependencies] dashmap = "4.0.2" -futures = "0.3.12" -http = "0.2.3" -serde_json = "1.0.61" -thiserror = "1.0.23" -tracing = "0.1.22" -url = "2.2.0" -zeroize = "1.2.0" +futures = "0.3.15" +http = "0.2.4" +serde_json = "1.0.64" +thiserror = "1.0.25" +tracing = "0.1.26" +url = "2.2.2" +zeroize = "1.3.0" mime = "0.3.16" -rand = { version = "0.8.2", optional = true } +rand = { version = "0.8.4", optional = true } bytes = "1.0.1" matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } @@ -51,7 +51,7 @@ path = "../matrix_sdk_base" default_features = false [dependencies.reqwest] -version = "0.11.0" +version = "0.11.3" default_features = false [dependencies.ruma] @@ -61,12 +61,12 @@ rev = "d73ab8add" features = ["client-api-c", "compat", "unstable-pre-spec"] [dependencies.tokio-stream] -version = "0.1.4" +version = "0.1.6" features = ["net"] optional = true [dependencies.warp] -version = "0.3.0" +version = "0.3.1" default-features = false optional = true @@ -75,7 +75,7 @@ version = "0.3.0" features = ["tokio"] [dependencies.tracing-futures] -version = "0.2.4" +version = "0.2.5" default-features = false features = ["std", "std-future"] @@ -83,7 +83,7 @@ features = ["std", "std-future"] futures-timer = "3.0.2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] -version = "1.1.0" +version = "1.7.1" default-features = false features = ["fs", "rt"] @@ -92,13 +92,13 @@ version = "3.0.2" features = ["wasm-bindgen"] [dev-dependencies] -dirs = "3.0.1" +dirs = "3.0.2" matrix-sdk-test = { version = "0.2.0", path = "../matrix_sdk_test" } -tokio = { version = "1.1.0", default-features = false, features = ["rt-multi-thread", "macros"] } -serde_json = "1.0.61" -tracing-subscriber = "0.2.15" +tokio = { version = "1.7.1", default-features = false, features = ["rt-multi-thread", "macros"] } +serde_json = "1.0.64" +tracing-subscriber = "0.2.18" tempfile = "3.2.0" -mockito = "0.29.0" +mockito = "0.30.0" lazy_static = "1.4.0" matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } diff --git a/matrix_sdk/examples/wasm_command_bot/Cargo.toml b/matrix_sdk/examples/wasm_command_bot/Cargo.toml index 91ad579d..0e49bf55 100644 --- a/matrix_sdk/examples/wasm_command_bot/Cargo.toml +++ b/matrix_sdk/examples/wasm_command_bot/Cargo.toml @@ -10,11 +10,11 @@ edition = "2018" crate-type = ["cdylib"] [dependencies] -url = "2.2.1" -wasm-bindgen = { version = "0.2.72", features = ["serde-serialize"] } -wasm-bindgen-futures = "0.4.22" +url = "2.2.2" +wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"] } +wasm-bindgen-futures = "0.4.24" console_error_panic_hook = "0.1.6" -web-sys = { version = "0.3.49", features = ["console"] } +web-sys = { version = "0.3.51", features = ["console"] } [dependencies.matrix-sdk] path = "../.." diff --git a/matrix_sdk_base/Cargo.toml b/matrix_sdk_base/Cargo.toml index 10af9343..9fdcd9b3 100644 --- a/matrix_sdk_base/Cargo.toml +++ b/matrix_sdk_base/Cargo.toml @@ -27,43 +27,43 @@ docs = ["encryption", "sled_cryptostore"] dashmap = "4.0.2" lru = "0.6.5" ruma = { version = "0.1.2", features = ["client-api-c", "unstable-pre-spec"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } -serde = { version = "1.0.122", features = ["rc"] } -serde_json = "1.0.61" -tracing = "0.1.22" +serde = { version = "1.0.126", features = ["rc"] } +serde_json = "1.0.64" +tracing = "0.1.26" matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } matrix-sdk-crypto = { version = "0.2.0", path = "../matrix_sdk_crypto", optional = true } # Misc dependencies -thiserror = "1.0.23" -futures = "0.3.12" -zeroize = { version = "1.2.0", features = ["zeroize_derive"] } +thiserror = "1.0.25" +futures = "0.3.15" +zeroize = { version = "1.3.0", features = ["zeroize_derive"] } # Deps for the sled state store sled = { version = "0.34.6", optional = true } -chacha20poly1305 = { version = "0.7.1", optional = true } -pbkdf2 = { version = "0.6.0", default-features = false, optional = true } -hmac = { version = "0.10.1", optional = true } -sha2 = { version = "0.9.2", optional = true } -rand = { version = "0.8.2", optional = true } +chacha20poly1305 = { version = "0.8.0", optional = true } +pbkdf2 = { version = "0.8.0", default-features = false, optional = true } +hmac = { version = "0.11.0", optional = true } +sha2 = { version = "0.9.5", optional = true } +rand = { version = "0.8.4", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] -version = "1.1.0" +version = "1.7.1" default-features = false features = ["sync", "fs"] [dev-dependencies] matrix-sdk-test = { version = "0.2.0", path = "../matrix_sdk_test" } -http = "0.2.3" +http = "0.2.4" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] -tokio = { version = "1.1.0", default-features = false, features = ["rt-multi-thread", "macros"] } +tokio = { version = "1.7.1", default-features = false, features = ["rt-multi-thread", "macros"] } tempfile = "3.2.0" -rustyline = "7.1.0" +rustyline = "8.2.0" rustyline-derive = "0.4.0" atty = "0.2.14" clap = "2.33.3" syntect = "4.5.0" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] -wasm-bindgen-test = "0.3.19" +wasm-bindgen-test = "0.3.24" diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 3eb20b6d..75e5bf13 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -11,21 +11,21 @@ repository = "https://github.com/matrix-org/matrix-rust-sdk" version = "0.2.0" [dependencies] -async-trait = "0.1.42" +async-trait = "0.1.50" instant = { version = "0.1.9", features = ["wasm-bindgen", "now"] } ruma = { version = "0.1.2", features = ["client-api-c"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } -serde = "1.0.122" +serde = "1.0.126" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] uuid = { version = "0.8.2", default-features = false, features = ["v4", "serde"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] -version = "1.1.0" +version = "1.7.1" default-features = false features = ["rt", "sync"] [target.'cfg(target_arch = "wasm32")'.dependencies] -futures = "0.3.12" +futures = "0.3.15" futures-locks = { version = "0.6.0", default-features = false } -wasm-bindgen-futures = "0.4" +wasm-bindgen-futures = "0.4.24" uuid = { version = "0.8.2", default-features = false, features = ["v4", "wasm-bindgen"] } diff --git a/matrix_sdk_crypto/Cargo.toml b/matrix_sdk_crypto/Cargo.toml index cfa3c4da..de8b3ba2 100644 --- a/matrix_sdk_crypto/Cargo.toml +++ b/matrix_sdk_crypto/Cargo.toml @@ -24,39 +24,39 @@ matrix-qrcode = { version = "0.1.0", path = "../matrix_qrcode" } matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } ruma = { version = "0.1.2", features = ["client-api-c", "unstable-pre-spec"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } -olm-rs = { version = "1.0.0", features = ["serde"] } -getrandom = "0.2.2" -serde = { version = "1.0.122", features = ["derive", "rc"] } -serde_json = "1.0.61" -zeroize = { version = "1.2.0", features = ["zeroize_derive"] } +olm-rs = { version = "1.0.1", features = ["serde"] } +getrandom = "0.2.3" +serde = { version = "1.0.126", features = ["derive", "rc"] } +serde_json = "1.0.64" +zeroize = { version = "1.3.0", features = ["zeroize_derive"] } # Misc dependencies -futures = "0.3.12" +futures = "0.3.15" sled = { version = "0.34.6", optional = true } -thiserror = "1.0.23" -tracing = "0.1.22" +thiserror = "1.0.25" +tracing = "0.1.26" atomic = "0.5.0" dashmap = "4.0.2" -sha2 = "0.9.2" -aes-gcm = "0.8.0" -aes-ctr = "0.6.0" -pbkdf2 = { version = "0.6.0", default-features = false } -hmac = "0.10.1" +sha2 = "0.9.5" +aes-gcm = "0.9.2" +aes = { version = "0.7.4", features = ["ctr"] } +pbkdf2 = { version = "0.8.0", default-features = false } +hmac = "0.11.0" base64 = "0.13.0" -byteorder = "1.4.2" +byteorder = "1.4.3" [dev-dependencies] -tokio = { version = "1.1.0", default-features = false, features = ["rt-multi-thread", "macros"] } -proptest = "0.10.1" -serde_json = "1.0.61" +tokio = { version = "1.7.1", default-features = false, features = ["rt-multi-thread", "macros"] } +proptest = "1.0.0" +serde_json = "1.0.64" tempfile = "3.2.0" -http = "0.2.3" +http = "0.2.4" matrix-sdk-test = { version = "0.2.0", path = "../matrix_sdk_test" } indoc = "1.0.3" criterion = { version = "0.3.4", features = ["async", "async_tokio", "html_reports"] } [target.'cfg(target_os = "linux")'.dev-dependencies] -pprof = { version = "0.4.2", features = ["flamegraph"] } +pprof = { version = "0.4.3", features = ["flamegraph"] } [[bench]] name = "crypto_bench" diff --git a/matrix_sdk_crypto/src/file_encryption/attachments.rs b/matrix_sdk_crypto/src/file_encryption/attachments.rs index d163c780..a2dc57dc 100644 --- a/matrix_sdk_crypto/src/file_encryption/attachments.rs +++ b/matrix_sdk_crypto/src/file_encryption/attachments.rs @@ -17,9 +17,9 @@ use std::{ io::{Error as IoError, ErrorKind, Read}, }; -use aes_ctr::{ - cipher::{NewStreamCipher, SyncStreamCipher}, - Aes256Ctr, +use aes::{ + cipher::{generic_array::GenericArray, FromBlockCipher, NewBlockCipher, StreamCipher}, + Aes256, Aes256Ctr, }; use base64::DecodeError; use getrandom::getrandom; @@ -126,9 +126,11 @@ impl<'a, R: Read + 'a> AttachmentDecryptor<'a, R> { let hash = decode(info.hashes.get("sha256").ok_or(DecryptorError::MissingHash)?)?; let key = Zeroizing::from(decode_url_safe(info.web_key.k)?); let iv = decode(info.iv)?; + let iv = GenericArray::from_exact_iter(iv).ok_or(DecryptorError::KeyNonceLength)?; let sha = Sha256::default(); - let aes = Aes256Ctr::new_var(&key, &iv).map_err(|_| DecryptorError::KeyNonceLength)?; + let aes = Aes256::new_from_slice(&key).map_err(|_| DecryptorError::KeyNonceLength)?; + let aes = Aes256Ctr::from_block_cipher(aes, &iv); Ok(AttachmentDecryptor { inner_reader: input, expected_hash: hash, sha, aes }) } @@ -209,8 +211,11 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> { ext: true, }); let encoded_iv = encode(&*iv); + let iv = GenericArray::from_slice(&*iv); + let key = GenericArray::from_slice(&*key); - let aes = Aes256Ctr::new_var(&*key, &*iv).expect("Cannot create AES encryption object."); + let aes = Aes256::new(key); + let aes = Aes256Ctr::from_block_cipher(aes, iv); AttachmentEncryptor { finished: false, diff --git a/matrix_sdk_crypto/src/file_encryption/key_export.rs b/matrix_sdk_crypto/src/file_encryption/key_export.rs index 95cc8bb6..be191420 100644 --- a/matrix_sdk_crypto/src/file_encryption/key_export.rs +++ b/matrix_sdk_crypto/src/file_encryption/key_export.rs @@ -14,9 +14,9 @@ use std::io::{Cursor, Read, Seek, SeekFrom}; -use aes_ctr::{ - cipher::{NewStreamCipher, SyncStreamCipher}, - Aes256Ctr, +use aes::{ + cipher::{generic_array::GenericArray, FromBlockCipher, NewBlockCipher, StreamCipher}, + Aes256, Aes256Ctr, }; use byteorder::{BigEndian, ReadBytesExt}; use getrandom::getrandom; @@ -161,7 +161,12 @@ fn encrypt_helper(mut plaintext: &mut [u8], passphrase: &str, rounds: u32) -> St pbkdf2::>(passphrase.as_bytes(), &salt, rounds, &mut derived_keys); let (key, hmac_key) = derived_keys.split_at(KEY_SIZE); - let mut aes = Aes256Ctr::new_var(key, &iv.to_be_bytes()).expect("Can't create AES object"); + let key = GenericArray::from_slice(key); + let iv = iv.to_be_bytes(); + let iv = GenericArray::from_slice(&iv); + + let aes = Aes256::new(key); + let mut aes = Aes256Ctr::from_block_cipher(aes, iv); aes.apply_keystream(&mut plaintext); @@ -169,11 +174,11 @@ fn encrypt_helper(mut plaintext: &mut [u8], passphrase: &str, rounds: u32) -> St payload.extend(&VERSION.to_be_bytes()); payload.extend(&salt); - payload.extend(&iv.to_be_bytes()); + payload.extend(&*iv); payload.extend(&rounds.to_be_bytes()); payload.extend_from_slice(plaintext); - let mut hmac = Hmac::::new_varkey(hmac_key).expect("Can't create HMAC object"); + let mut hmac = Hmac::::new_from_slice(hmac_key).expect("Can't create HMAC object"); hmac.update(&payload); let mac = hmac.finalize(); @@ -213,12 +218,16 @@ fn decrypt_helper(ciphertext: &str, passphrase: &str) -> Result>(passphrase.as_bytes(), &salt, rounds, &mut derived_keys); let (key, hmac_key) = derived_keys.split_at(KEY_SIZE); - let mut hmac = Hmac::::new_varkey(hmac_key).expect("Can't create an HMAC object"); + let mut hmac = Hmac::::new_from_slice(hmac_key).expect("Can't create an HMAC object"); hmac.update(&decoded[0..ciphertext_end]); hmac.verify(&mac).map_err(|_| KeyExportError::InvalidMac)?; + let key = GenericArray::from_slice(key); + let iv = GenericArray::from_slice(&iv); + let mut ciphertext = &mut decoded[ciphertext_start..ciphertext_end]; - let mut aes = Aes256Ctr::new_var(key, &iv).expect("Can't create an AES object"); + let aes = Aes256::new(key); + let mut aes = Aes256Ctr::from_block_cipher(aes, iv); aes.apply_keystream(&mut ciphertext); Ok(String::from_utf8(ciphertext.to_owned())?) diff --git a/matrix_sdk_test/Cargo.toml b/matrix_sdk_test/Cargo.toml index cbb03617..5366dba3 100644 --- a/matrix_sdk_test/Cargo.toml +++ b/matrix_sdk_test/Cargo.toml @@ -14,10 +14,10 @@ version = "0.2.0" appservice = [] [dependencies] -http = "0.2.3" +http = "0.2.4" lazy_static = "1.4.0" matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } matrix-sdk-test-macros = { version = "0.1.0", path = "../matrix_sdk_test_macros" } ruma = { version = "0.1.2", features = ["client-api-c"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } -serde = "1.0.122" -serde_json = "1.0.61" +serde = "1.0.126" +serde_json = "1.0.64" From 513fbd8900306950ec60b7ad5f0018c39883121e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 21 Jun 2021 17:29:46 +0200 Subject: [PATCH 2/3] crypto: Manually implement Debug for attachment encryptors/decryptors --- .../src/file_encryption/attachments.rs | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/matrix_sdk_crypto/src/file_encryption/attachments.rs b/matrix_sdk_crypto/src/file_encryption/attachments.rs index a2dc57dc..cdf82ab2 100644 --- a/matrix_sdk_crypto/src/file_encryption/attachments.rs +++ b/matrix_sdk_crypto/src/file_encryption/attachments.rs @@ -37,17 +37,25 @@ const VERSION: &str = "v2"; /// A wrapper that transparently encrypts anything that implements `Read` as an /// Matrix attachment. -#[derive(Debug)] pub struct AttachmentDecryptor<'a, R: 'a + Read> { - inner_reader: &'a mut R, + inner: &'a mut R, expected_hash: Vec, sha: Sha256, aes: Aes256Ctr, } +impl<'a, R: 'a + Read + std::fmt::Debug> std::fmt::Debug for AttachmentDecryptor<'a, R> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("AttachmentDecryptor") + .field("inner", &self.inner) + .field("expected_hash", &self.expected_hash) + .finish() + } +} + impl<'a, R: Read> Read for AttachmentDecryptor<'a, R> { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - let read_bytes = self.inner_reader.read(buf)?; + let read_bytes = self.inner.read(buf)?; if read_bytes == 0 { let hash = self.sha.finalize_reset(); @@ -132,15 +140,14 @@ impl<'a, R: Read + 'a> AttachmentDecryptor<'a, R> { let aes = Aes256::new_from_slice(&key).map_err(|_| DecryptorError::KeyNonceLength)?; let aes = Aes256Ctr::from_block_cipher(aes, &iv); - Ok(AttachmentDecryptor { inner_reader: input, expected_hash: hash, sha, aes }) + Ok(AttachmentDecryptor { inner: input, expected_hash: hash, sha, aes }) } } /// A wrapper that transparently encrypts anything that implements `Read`. -#[derive(Debug)] pub struct AttachmentEncryptor<'a, R: Read + 'a> { finished: bool, - inner_reader: &'a mut R, + inner: &'a mut R, web_key: JsonWebKey, iv: String, hashes: BTreeMap, @@ -148,9 +155,18 @@ pub struct AttachmentEncryptor<'a, R: Read + 'a> { sha: Sha256, } +impl<'a, R: 'a + Read + std::fmt::Debug> std::fmt::Debug for AttachmentEncryptor<'a, R> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("AttachmentEncryptor") + .field("inner", &self.inner) + .field("finished", &self.finished) + .finish() + } +} + impl<'a, R: Read + 'a> Read for AttachmentEncryptor<'a, R> { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - let read_bytes = self.inner_reader.read(buf)?; + let read_bytes = self.inner.read(buf)?; if read_bytes == 0 { let hash = self.sha.finalize_reset(); @@ -219,7 +235,7 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> { AttachmentEncryptor { finished: false, - inner_reader: reader, + inner: reader, iv: encoded_iv, web_key, hashes: BTreeMap::new(), From 57b2f6ad22f4199a6054ce70b5e32462153f7fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 21 Jun 2021 19:53:26 +0200 Subject: [PATCH 3/3] matrix-sdk: Switch to a release of ruma --- matrix_qrcode/Cargo.toml | 2 +- matrix_sdk/Cargo.toml | 4 +--- matrix_sdk_appservice/Cargo.toml | 4 +--- matrix_sdk_base/Cargo.toml | 2 +- matrix_sdk_common/Cargo.toml | 2 +- matrix_sdk_crypto/Cargo.toml | 2 +- matrix_sdk_test/Cargo.toml | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/matrix_qrcode/Cargo.toml b/matrix_qrcode/Cargo.toml index 69d87fa0..47a14c7f 100644 --- a/matrix_qrcode/Cargo.toml +++ b/matrix_qrcode/Cargo.toml @@ -20,5 +20,5 @@ byteorder = "1.4.3" image = { version = "0.23.14", optional = true } qrcode = { version = "0.12.0", default-features = false } rqrr = { version = "0.3.2", optional = true } -ruma-identifiers = { version = "0.19.3", git = "https://github.com/ruma/ruma", rev = "d73ab8add" } +ruma-identifiers = "0.19.3" thiserror = "1.0.25" diff --git a/matrix_sdk/Cargo.toml b/matrix_sdk/Cargo.toml index ef107277..eea9b3c7 100644 --- a/matrix_sdk/Cargo.toml +++ b/matrix_sdk/Cargo.toml @@ -55,9 +55,7 @@ version = "0.11.3" default_features = false [dependencies.ruma] -version = "0.1.2" -git = "https://github.com/ruma/ruma" -rev = "d73ab8add" +version = "0.2.0" features = ["client-api-c", "compat", "unstable-pre-spec"] [dependencies.tokio-stream] diff --git a/matrix_sdk_appservice/Cargo.toml b/matrix_sdk_appservice/Cargo.toml index 4a21b3df..6d38a561 100644 --- a/matrix_sdk_appservice/Cargo.toml +++ b/matrix_sdk_appservice/Cargo.toml @@ -32,9 +32,7 @@ warp = { git = "https://github.com/seanmonstar/warp.git", rev = "629405", option matrix-sdk = { version = "0.2", path = "../matrix_sdk", default-features = false, features = ["appservice", "native-tls"] } [dependencies.ruma] -version = "0.1.2" -git = "https://github.com/ruma/ruma" -rev = "d73ab8add" +version = "0.2.0" features = ["client-api-c", "appservice-api-s", "unstable-pre-spec"] [dev-dependencies] diff --git a/matrix_sdk_base/Cargo.toml b/matrix_sdk_base/Cargo.toml index 9fdcd9b3..063bcf23 100644 --- a/matrix_sdk_base/Cargo.toml +++ b/matrix_sdk_base/Cargo.toml @@ -26,7 +26,7 @@ docs = ["encryption", "sled_cryptostore"] [dependencies] dashmap = "4.0.2" lru = "0.6.5" -ruma = { version = "0.1.2", features = ["client-api-c", "unstable-pre-spec"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } +ruma = { version = "0.2.0", features = ["client-api-c", "unstable-pre-spec"] } serde = { version = "1.0.126", features = ["rc"] } serde_json = "1.0.64" tracing = "0.1.26" diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 75e5bf13..886c8e3e 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -13,7 +13,7 @@ version = "0.2.0" [dependencies] async-trait = "0.1.50" instant = { version = "0.1.9", features = ["wasm-bindgen", "now"] } -ruma = { version = "0.1.2", features = ["client-api-c"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } +ruma = { version = "0.2.0", features = ["client-api-c"] } serde = "1.0.126" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/matrix_sdk_crypto/Cargo.toml b/matrix_sdk_crypto/Cargo.toml index de8b3ba2..3cce6902 100644 --- a/matrix_sdk_crypto/Cargo.toml +++ b/matrix_sdk_crypto/Cargo.toml @@ -22,7 +22,7 @@ docs = ["sled_cryptostore"] [dependencies] matrix-qrcode = { version = "0.1.0", path = "../matrix_qrcode" } matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } -ruma = { version = "0.1.2", features = ["client-api-c", "unstable-pre-spec"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } +ruma = { version = "0.2.0", features = ["client-api-c", "unstable-pre-spec"] } olm-rs = { version = "1.0.1", features = ["serde"] } getrandom = "0.2.3" diff --git a/matrix_sdk_test/Cargo.toml b/matrix_sdk_test/Cargo.toml index 5366dba3..21eca785 100644 --- a/matrix_sdk_test/Cargo.toml +++ b/matrix_sdk_test/Cargo.toml @@ -18,6 +18,6 @@ http = "0.2.4" lazy_static = "1.4.0" matrix-sdk-common = { version = "0.2.0", path = "../matrix_sdk_common" } matrix-sdk-test-macros = { version = "0.1.0", path = "../matrix_sdk_test_macros" } -ruma = { version = "0.1.2", features = ["client-api-c"], git = "https://github.com/ruma/ruma", rev = "d73ab8add" } +ruma = { version = "0.2.0", features = ["client-api-c"] } serde = "1.0.126" serde_json = "1.0.64"