Commit Graph

11 Commits

Author SHA1 Message Date
Jordan Rose
f19815b938 swift: Add a low-level helper invokeFnReturningValueByPointer
...and use it to avoid having to name return types for bridge
functions, which return by out-parameter.
2025-10-14 11:22:22 -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
Jordan Rose
02c03c3247 swift: Variadic withAllBorrowed, to break down the pyramids of doom 2025-06-13 17:49:56 -07:00
Alex Bakon
8e950c4691 Port Swift args, return types from [UInt8] to Data 2025-06-13 15:15:04 -04:00
Jordan Rose
0e1ec3909b bridge: Require that PreKeyBundles have Kyber pre-keys
Support for starting sessions with pre-quantum X3DH has been removed
from Swift, Java, and TypeScript. PQXDH will be required going
forward.
2025-05-19 12:25:53 -07: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
Jordan Rose
6b7c072fe2 swift: Fix PreKeyBundle accessors
getPreKeyId was returning an incorrect value, and the Kyber fields
were missing altogether. None of this affected security of the iOS app
because the iOS app only constructed PreKeyBundles for libsignal to
process, and never read any of these fields. If it did, it would have
failed to establish a session due to the incorrect pre-key ID.

Caught by @dtimoshenko99; thank you!
2024-04-09 16:04:59 -07:00
moiseev-signal
58f43107ab Enforce Swift code formatting 2024-02-23 09:56:38 -08:00
moiseev-signal
30ce471b2b swift: Add PQXDH support 2023-06-08 17:30:11 -07:00
Jordan Rose
f3e0f61667 bridge: Remove bridge_fn_buffer
At this point, the only special behavior of bridge_fn_buffer is to
support multiple return values for the C bridge (a pointer/length
pair), and that doesn't pull its weight. Remove it in favor of a plain
bridge_fn.

This did reveal that Username_Hash was using bridge_fn_buffer and now
produces a fixed-size array, imported into Swift as a tuple, so this
commit also factors out a new helper invokeFnReturningFixedLengthArray.
2023-02-21 16:41:03 -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