Commit Graph

13 Commits

Author SHA1 Message Date
Jordan Rose
55b233d43c ffi: Support multiple return values for bridge_callbacks
...and use it to avoid re-deriving the public key when fetching the
local identity key pair.
2026-03-06 12:01:41 -08:00
Jordan Rose
e11318dbdb Switch remaining C stores over to bridge_callbacks
This removes a micro-optimization used by IdentityKeyStore to combine 
bool and enum results. We can live without it.
2026-01-14 17:25:04 -08:00
Jordan Rose
f2eafbe6f8 bridge: Use bridge_callbacks for KyberPreKeyStore (C bridge only)
Adds support for return values and error results to #[bridge_callbacks],
and then provides the necessary extra *TypeInfo impls to support
KyberPreKeyStore.

This also drops the "lazy clone" optimization previously used by the
store, where a bridged handle owned by Rust can be "borrowed" by the
Swift side and then cloned if still alive when the callback is about
to complete. Now the value is cloned eagerly, and destroyed via Swift
regardless. This is unfortunate, but the Android bridge has never had
this optimization, and Android supports devices with worse
performance, so we should be able to live with it.
2026-01-09 14:20:32 -08:00
Jordan Rose
15af92c93d protocol: Record signed prekey and base key used with a Kyber prekey 2025-09-16 15:33:59 -07:00
Jordan Rose
9e13263581 Switch to swift-format for formatting instead of swiftformat
swift-format is owned by the Swift project and is generally less
opinionated than swiftformat (but better at formatting to a limited
line length).
2025-06-25 11:24:57 -07:00
Alex Bakon
8f1baf561c Use an enum value for IdentityKeyStore.saveIdentity in libraries 2025-04-25 12:52:58 -04:00
Alex Konradi
33b8e9c3d8 Use strong pointer types for Swift bridge
Wrap the raw pointers exposed across the bridge as named types that approximate 
Swift's OpaquePointer?. Parameterize NativeHandleOwner with the native handle 
type.
2024-12-18 10:00:07 -05:00
moiseev-signal
58f43107ab Enforce Swift code formatting 2024-02-23 09:56:38 -08:00
Jordan Rose
008fad966e 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.
2023-07-27 15:40:44 -07:00
moiseev-signal
30ce471b2b swift: Add PQXDH support 2023-06-08 17:30:11 -07:00
Jessa
9eb3483938 Add MP4 format sanitizer
This MP4 format "sanitizer" currently only transforms (when necessary) outgoing media on iOS, Android, or Desktop to
make it suitable for streaming playback by the recepient. In the future, it will validate and be able to either repair
or reject outbound AND inbound media, to prevent malformed media from being fed to third party or OS media players.

An generic io module was added to the libsignal rust bridge containing the InputStream trait, modeled loosely after
Java's InputStream, which calls back into the client language to perform reads or skips. This infrastructure could
potentially also be for any other future large data inputs to libsignal functions.
2023-05-01 12:01:08 -07:00
Jordan Rose
f781b17e74 swift: Update to the current version of cbindgen
...which handles enum variants slightly differently under the
configuration options we have ('remove_underscores', relevant for
generic types rather than enum variants). The new style is closer to
Apple-idiomatic anyway.
2023-02-27 14:07:19 -08:00
Jordan Rose
0542686e70 Update artifact/package/module names across all three app languages
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
2022-03-23 10:49:09 -07:00