Commit Graph

42 Commits

Author SHA1 Message Date
marc-signal
0a58e80bbc Add support for a retry later duration in rate limit challenge responses 2026-03-26 17:08:19 -07:00
marc-signal
a47ba487a7 Add getPreKeys() client library 2026-03-17 13:18:06 -04:00
Jordan Rose
5d1433cedd bridge: Add dedicated PossibleCaptiveNetwork error
This only applies to chat connections (including registration), and
for the time being is specifically looking for self-signed
certificates. Even though self-signed certificates can occur on any
network access, there should always be a chat connection early enough
in the app lifetime to identify the problem. (Other connections will
still log the error appropriately.)
2025-12-12 17:26:00 -08:00
Jordan Rose
2b6c801fb6 bridge: Expose sendMultiRecipientMessage in UnauthMessagesService 2025-10-14 18:17:25 -07:00
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
fed4bbb20f ffi: Use pair-returning bridge_fns for error accessors too 2025-10-09 11:31:20 -07:00
andrew-signal
ec3c273219 Expose Rust API for SVR-B 2025-07-23 18:59:54 -04:00
Jordan Rose
3c1ee4aee2 ffi: Make &SignalFfiError a valid bridge_fn argument 2025-07-02 13:37:53 -07:00
moiseev-signal
d0425f2d3f swift: Make FingerprintMismatch error more useful 2025-06-25 15:20:04 -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
841f57c30f Move (RegistrationSessionState)RequestedInformation -> ChallengeOption 2025-06-23 10:37:55 -07:00
Alex Bakon
56c63a4838 Refactor registration errors on existing types 2025-06-20 17:14:52 -04:00
Alex Bakon
02b786b07e Limit device ID to the range 1-127
This is already required for sealed sender messages and enforced by the server.
2025-06-13 14:18:16 -04:00
moiseev-signal
70c342bb5d keytrans: Bridge to ffi 2025-05-27 17:03:39 -07:00
Alex Bakon
840f14d2b3 Bridge register account method to Swift 2025-05-14 12:29:24 -04:00
Alex Bakon
3de159b65e Bridge remaining registration errors to Swift 2025-05-06 11:30:54 -04:00
Alex Bakon
afe710164c Start bridging registration client errors to Swift 2025-05-06 10:55:37 -04:00
andrew-signal
0a6376525f Implement ConnectionInvalidated and ConnectedElsewhere Disconnection Reasons 2025-04-02 15:06:37 -04:00
Alex Bakon
ffdb35f59f Improve error handling for ChatConnection 2025-02-21 16:06:37 -05:00
Jordan Rose
9299dbe8b9 swift: Consolidate separate backup error representations
MessageBackupValidationError and `SignalError.backupValidation` carry
the same information, and the former is already checked for by name in
the iOS code, so let's standardize on that.
2024-11-20 12:04:33 -08:00
Jordan Rose
aaa481aa9a swift: Expose the reason a ChatService was disconnected 2024-09-17 10:03:34 -07:00
Alex Konradi
40aaecb9f3 Propagate reason for chat disconnect to listeners 2024-09-05 16:49:55 -04:00
gram-signal
1c2113617f SVR - Add new protocol Rotate trait and test.
Co-authored-by: Max Moiseev <moiseev@signal.org>
2024-08-30 16:28:29 -07:00
Alex Konradi
66cd3f0133 backup: bridge canonical serialization as ComparableBackup 2024-07-16 14:20:31 -04:00
Jordan Rose
9a8429da46 net: Add AppExpired and DeviceDeregistered errors for ChatService
And check bridging for every high-level ChatServiceError like we do
with CdsiLookupErrors.
2024-05-23 10:27:28 -07:00
moiseev-signal
c55aa17a9f SVR3: Propagate tries_remaining on restore failure 2024-05-20 15:49:59 -07:00
Jordan Rose
e1aa542bd5 ffi: Expose LibsignalLogger protocol rather than depending on DDLog
This drops the SignalCoreKit dependency for the CocoaPod, but does
mean clients will have to register their own logger explicitly.
2024-05-20 13:43:39 -07:00
Jordan Rose
7dc63b99af ffi: Expose cancellation to Swift 2024-05-17 11:30:24 -07:00
Jordan Rose
53ba4c28c4 Swift: Add missing error cases
And set up a script to catch them in the future.
2024-04-04 12:57:26 -07:00
Jordan Rose
96fce497db Bridge unauthenticated connection to Swift
- Remove From<http::header::ToStrError> for ChatServiceError
- bridge: Response -> ChatResponse, DebugInfo -> ChatServiceDebugInfo
2024-04-01 09:24:46 -07:00
Alex Konradi
10a6d8b744 Remove enclave operation timeout arguments
The enclave interactions have internal progress monitoring in the form of 
websocket PING/PONG frames, so the timeout parameters aren't necessary for 
broken connection detection.
2024-03-29 18:13:40 -04:00
Alex Konradi
e87a1cba14 Handle "invalid token" response to CDSI request 2024-03-25 14:13:14 -04:00
Alex Konradi
26ebd007ab Split up NetError type
Split up the NetError type into errors for specific services (CDSI, SVR3, 
Chat). Return these from their respective bridged functions.
2024-03-20 15:54:59 -04:00
moiseev-signal
d7d2576ae6 SVR3: FFI bridge 2024-02-29 18:22:59 -08:00
moiseev-signal
58f43107ab Enforce Swift code formatting 2024-02-23 09:56:38 -08:00
Alex Konradi
5b5b85e715 Expose CDSI lookup via FFI 2024-02-22 10:31:01 -05:00
Jordan Rose
0ef2c7cc54 usernames: Split up BadDiscriminator error into more specific errors
Rust: UsernameError now has more cases. ProofVerificationFailure is
also split off into its own error type, separate from structural
username errors.

Java: Subclasses of BadDiscriminatorException have been added.

Swift: Some error codes have been renamed and others have been added.

TypeScript: Some error codes have been renamed and others have been
added. Discriminator errors are now proper LibSignalErrors.
2024-01-10 12:26:19 -08:00
Sergey Skrobotov
ca262db5ec bridge for username links 2023-07-06 15:51:52 -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
Max Moiseev
33d8421ca9 Bridge username hashing APIs to all client platforms 2023-02-03 17:44:29 -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