protocol: Rip "Context" out of the Rust layer

Only the iOS client ever used this extra parameter, and it's one
that's easily stored alongside the reference to a store. This is
massively simpler than having it threaded down to the Rust
libsignal_protocol and back up through the bridging layer.
This commit is contained in:
Jordan Rose
2023-07-20 17:16:45 -07:00
parent dea887e94c
commit 008fad966e
40 changed files with 510 additions and 1147 deletions

View File

@@ -11,7 +11,7 @@ use libc::{c_char, c_uchar, c_uint, size_t};
use libsignal_bridge::ffi::*;
use libsignal_protocol::*;
use std::convert::TryFrom;
use std::ffi::{c_void, CString};
use std::ffi::CString;
use std::panic::AssertUnwindSafe;
pub mod logging;
@@ -163,7 +163,6 @@ pub unsafe extern "C" fn signal_sealed_session_cipher_decrypt(
identity_store: *const FfiIdentityKeyStoreStruct,
prekey_store: *const FfiPreKeyStoreStruct,
signed_prekey_store: *const FfiSignedPreKeyStoreStruct,
ctx: *mut c_void,
) -> *mut SignalFfiError {
run_ffi_safe(|| {
let mut kyber_pre_key_store = InMemKyberPreKeyStore::new();
@@ -191,7 +190,6 @@ pub unsafe extern "C" fn signal_sealed_session_cipher_decrypt(
&mut prekey_store,
&mut signed_prekey_store,
&mut kyber_pre_key_store,
Some(ctx),
)
.now_or_never()
.expect("synchronous")?;