From 63c9520a08775d02917743f2696671e3377b7571 Mon Sep 17 00:00:00 2001 From: SimonThormeyer Date: Mon, 7 Oct 2024 10:08:49 +0200 Subject: [PATCH] fixup implement cache --- crypto-ffi/src/generic/mod.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/crypto-ffi/src/generic/mod.rs b/crypto-ffi/src/generic/mod.rs index 15d057a4d..09874039c 100644 --- a/crypto-ffi/src/generic/mod.rs +++ b/crypto-ffi/src/generic/mod.rs @@ -1664,7 +1664,7 @@ impl CoreCrypto { expiry_sec: u32, ciphersuite: Ciphersuite, ) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_new_activation_enrollment(display_name, handle, team, expiry_sec, ciphersuite.into()) .await @@ -1685,7 +1685,7 @@ impl CoreCrypto { expiry_sec: u32, ciphersuite: Ciphersuite, ) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_new_rotate_enrollment(display_name, handle, team, expiry_sec, ciphersuite.into()) .await @@ -1708,7 +1708,7 @@ impl CoreCrypto { /// See [core_crypto::mls::MlsCentral::e2ei_register_acme_ca] #[deprecated = "Please create a transaction in Core Crypto and call this method from it."] pub async fn e2ei_register_acme_ca(&self, trust_anchor_pem: String) -> CoreCryptoResult<()> { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; context.e2ei_register_acme_ca(trust_anchor_pem).await?; Ok(context.finish().await?) } @@ -1716,7 +1716,7 @@ impl CoreCrypto { /// See [core_crypto::mls::MlsCentral::e2ei_register_intermediate_ca_pem] #[deprecated = "Please create a transaction in Core Crypto and call this method from it."] pub async fn e2ei_register_intermediate_ca(&self, cert_pem: String) -> CoreCryptoResult>> { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context.e2ei_register_intermediate_ca_pem(cert_pem).await?.into(); context.finish().await?; Ok(result) @@ -1725,7 +1725,7 @@ impl CoreCrypto { /// See [core_crypto::mls::MlsCentral::e2ei_register_crl] #[deprecated = "Please create a transaction in Core Crypto and call this method from it."] pub async fn e2ei_register_crl(&self, crl_dp: String, crl_der: Vec) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context.e2ei_register_crl(crl_dp, crl_der).await?.into(); context.finish().await?; Ok(result) @@ -1744,7 +1744,7 @@ impl CoreCrypto { .transpose() .map_err(CryptoError::from)?; - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_mls_init_only( enrollment.0.write().await.deref_mut(), @@ -1765,7 +1765,7 @@ impl CoreCrypto { certificate_chain: String, new_key_packages_count: u32, ) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_rotate_all( enrollment.0.write().await.deref_mut(), @@ -1786,7 +1786,7 @@ impl CoreCrypto { .ok_or_else(|| CryptoError::LockPoisonError)? .into_inner(); - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context.e2ei_enrollment_stash(enrollment).await?; context.finish().await?; Ok(result) @@ -1795,7 +1795,7 @@ impl CoreCrypto { /// See [core_crypto::mls::MlsCentral::e2ei_enrollment_stash_pop] #[deprecated = "Please create a transaction in Core Crypto and call this method from it."] pub async fn e2ei_enrollment_stash_pop(&self, handle: Vec) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_enrollment_stash_pop(handle) .await @@ -1809,7 +1809,7 @@ impl CoreCrypto { /// See [core_crypto::mls::MlsCentral::e2ei_conversation_state] #[deprecated = "Please create a transaction in Core Crypto and call this method from it."] pub async fn e2ei_conversation_state(&self, conversation_id: Vec) -> CoreCryptoResult { - let context = self.central.new_transaction().await; + let context = self.central.new_transaction().await?; let result = context .e2ei_conversation_state(&conversation_id) .await @@ -1965,7 +1965,7 @@ impl E2eiEnrollment { cc: std::sync::Arc, challenge: Vec, ) -> CoreCryptoResult<()> { - let context = cc.central.new_transaction().await; + let context = cc.central.new_transaction().await?; self.0 .write() .await