Skip to content

Commit 917f9ee

Browse files
committed
chore: Bump vodozemac
1 parent c7d44dd commit 917f9ee

17 files changed

Lines changed: 144 additions & 105 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ uniffi_bindgen = { version = "0.31.0", default-features = false, features = ["ca
119119
url = { version = "2.5.7", default-features = false }
120120
uuid = { version = "1.18.1", default-features = false }
121121
vergen-gitcl = { version = "1.0.8", default-features = false }
122-
vodozemac = { version = "0.9.0", default-features = false, features = ["libolm-compat", "insecure-pk-encryption"] }
122+
vodozemac = { version = "0.10.0", default-features = false, features = ["libolm-compat", "insecure-pk-encryption", "experimental-session-config"] }
123123
wasm-bindgen = { version = "0.2.105", default-features = false }
124124
wasm-bindgen-test = { version = "0.3.55", default-features = false, features = ["std"] }
125125
web-sys = { version = "0.3.82", default-features = false }

bindings/matrix-sdk-crypto-ffi/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,18 +1015,18 @@ impl PkEncryption {
10151015
}
10161016

10171017
/// Encrypt a message using this [`PkEncryption`] object.
1018-
pub fn encrypt(&self, plaintext: &str) -> PkMessage {
1018+
pub fn encrypt(&self, plaintext: &str) -> Option<PkMessage> {
10191019
use vodozemac::base64_encode;
10201020

1021-
let message = self.inner.encrypt(plaintext.as_ref());
1021+
let message = self.inner.encrypt(plaintext.as_ref()).ok()?;
10221022

10231023
let vodozemac::pk_encryption::Message { ciphertext, mac, ephemeral_key } = message;
10241024

1025-
PkMessage {
1025+
Some(PkMessage {
10261026
ciphertext: base64_encode(ciphertext),
10271027
mac: base64_encode(mac),
10281028
ephemeral_key: ephemeral_key.to_base64(),
1029-
}
1029+
})
10301030
}
10311031
}
10321032

0 commit comments

Comments
 (0)