0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 03:52:17 +02:00
Commit Graph

130 Commits

Author SHA1 Message Date
Sergey Skrobotov
4b283b7b4f
net: dropping reconnect count field 2024-08-07 19:11:43 -07:00
Sergey Skrobotov
55ac7166e0
net: dropping auto-reconnect logic 2024-08-07 16:38:45 -07:00
Jordan Rose
a561392cff
Expose the "network changed" event to apps 2024-07-30 15:27:42 -07:00
Sergey Skrobotov
d694cff1a1
net: adding a parameter to opt in/out of receiving stories 2024-07-25 14:55:23 -07:00
Alex Konradi
66cd3f0133
backup: bridge canonical serialization as ComparableBackup 2024-07-16 14:20:31 -04:00
Alex Konradi
31759a5680
Add libsignal-bridge-testing for Node
Unlike Java, just bundle it into the exiting signal_node shared library. We 
don't care as much about code size here and splitting it into a separate 
library is significantly more complicated (though it might be worth it some 
day).
2024-07-10 14:09:35 -04:00
Alex Konradi
c6857dd58e
Don't assume EOF on 0-length read for Node
Remove the special handling code that detects EOF now that the upstream crate 
has fixed the bug that was being worked around. This also fixes a bug where EOF 
was being incorrectly detected when the provided buffer was empty. Add a test 
case to prevent regression in the future.
2024-07-09 11:58:43 -04:00
Sergey Skrobotov
4243979826
net: support status codes when responding to server messages 2024-06-26 14:40:04 -07:00
Jordan Rose
4e2a7de574 Expose the 'Stopped' event to Swift and Node
Swift: ChatListener.chatServiceConnectionWasInterrupted(_:)
Node: ChatServiceListener.onConnectionInterrupted()
2024-06-13 15:54:21 -07:00
Sergey Skrobotov
b3ec2cc7f2
net: chat listener bridging to node 2024-06-13 11:20:08 -07: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
Jordan Rose
a5fa231a1c bridge: Expose ChatService_InjectRawServerRequest for testing 2024-05-21 13:04:18 -07:00
Jordan Rose
a513d61a09 bridge: Expose ChatListener to Swift
(and lay groundwork for the other bridges)
2024-05-21 13:04:18 -07:00
moiseev-signal
70ba17491c
SVR3: Implement remove API 2024-05-21 10:33:33 -07:00
Jordan Rose
7dc63b99af ffi: Expose cancellation to Swift 2024-05-17 11:30:24 -07:00
Jordan Rose
99e337f552 bridge: Expose authenticated sends on ChatService 2024-05-15 15:48:47 -07:00
Sergey Skrobotov
ab733bf00a libsignal-net: support for User-Agent header 2024-05-01 20:02:08 -07:00
Sergey Skrobotov
eb3929f1bf
libsignal-net: expose ipv6_enabled DnsResolver option to Node 2024-04-19 14:14:45 -07:00
Jordan Rose
9f53f3d1e7 BackupAuthCredential: verify the redemption time on receive
This is passed both within the credential response and outside it, so
it's important to make sure the two times match.
2024-04-19 13:41:59 -07:00
ravi-signal
9204831745
Use an enum for BackupAuthCredential's level 2024-04-19 11:46:49 -07:00
Sergey Skrobotov
3864f33b4d libsignal-net: dropping DebugInfo.connectionReused field 2024-04-16 10:20:00 -07:00
Alex Konradi
f72f33d3ee
Remove code that handles auth cred with ACI as PNI
These functions are unused in client and server code.
2024-04-11 17:08:18 -04:00
Alex Konradi
06c1780a14
Hold server zkparams as pointers 2024-04-09 16:13:22 -04:00
Alex Konradi
79bab1ce78
Expose TLS proxy in app libraries
Co-authored-by: Sergey Skrobotov <sergey@signal.org>
2024-04-02 16:22:18 -04:00
Sergey Skrobotov
a829c8f2e3
libsignal-net: introducing a separate ChatService class for Node 2024-04-01 16:25:23 -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
Sergey Skrobotov
8c1eadc0e7 libsignal-net: refining ServiceWithReconnect activity states logic 2024-03-29 13:33:19 -07:00
Sergey Skrobotov
aca995d745 libsignal-net: additional API and debug info 2024-03-27 12:39:24 -07:00
Alex Konradi
ed19489470
Improve CDSI errors
Add bridging tests for all the CDSI error types, and diversify the types of 
exceptions that can be thrown from Java code.
2024-03-25 13:39:06 -04:00
Sergey Skrobotov
d7a4b8c817 libsignal-net: ChatService jni bridge 2024-03-21 13:19:27 -07:00
Jordan Rose
8ed2dc1195 Remove GroupSendCredential
Long live GroupSendEndorsements!
2024-03-14 12:31:30 -07:00
Jordan Rose
256f4742c7 bridge: Add tests for bridging arrays of bytestrings 2024-03-13 12:22:46 -07:00
Jordan Rose
8fb6cc31cf bridge: Make a combined endorsement for GroupSendEndorsementsResponse
Specifically, make this on the Rust side bridge layer, and tack it on
to the end of per-member endorsements for the app side to peel off
later, rather than the app layer calling back down to Rust to compute
it. This saves a fair amount of marshalling work.
2024-03-12 14:54:04 -07:00
Alex Konradi
60f066dbac
Remove AuthCredential
This hasn't been used in client code for some time.
2024-03-11 16:43:23 -04:00
Jordan Rose
cdef8228a2 bridge: Expose GroupSendEndorsement APIs 2024-03-11 13:41:48 -07:00
Alex Konradi
f4f478fd06
Add authentication credential implemented with zkc
Add a new version of the existing auth credential used for groups, but 
implemented with the zkcredential crate instead of hand-written proofs. Expose 
issuance point for the server, and extend existing client methods to support it 
and the existing formats transparently.
2024-03-08 15:38:23 -05:00
Alex Konradi
274b680ef4
Expose message backup purpose as an argument
Add a flag to the CLI validation tool and an argument to the bridged validation 
functions so users can specify whether a provided message backup should be 
validated according to the rules for device-to-device transfers or backups 
intended for remote storage.
2024-03-01 09:53:00 -05:00
Sergey Skrobotov
2d0b32d9df libsignal-net: use millis for timeout, pass status message back 2024-02-28 15:30:31 -08:00
Sergey Skrobotov
ec49a9774b libsignal-net: ChatService node bridge 2024-02-27 11:07:57 -08:00
moiseev-signal
536ec242c9
SVR3: Node bridge 2024-02-23 14:50:53 -08:00
Jordan Rose
a4da946705 node: Use JsBigInt for u64 bridging instead of a Buffer 2024-02-23 13:40:44 -08:00
moiseev-signal
6f783269db
SVR3: JNI bridge 2024-02-22 12:22:10 -08:00
Alex Konradi
1359b67486
Cache classes during initial Java library load
Use the class loader from the main thread to cache java.lang.Class
instances for some libsignal classes.

This enables constructing instances of libsignal classes on threads
where the classes aren't accessible via the default class loader. This
can occur on Android, where threads spawned via the native API only get
access to the system class loader, not the application loader that has
access to the application's class files. Since Tokio worker threads are
spawned via the native API, and the completion process for async tasks
converts results to Java objects, application class instances can't be
used there unless they are preloaded.

Since classes used in client code are only included in the client .jar
file, failure to load classes is a normal occurrence. If there are ever
separate builds for server and client .so library files, this could be
changed to a fatal error.
2024-02-16 10:38:12 -05:00
Alex Konradi
100ce19945
Fix Java error handling for CDSI lookup
CDSI error handling code would attempt to instantiate a nonexistent Java class. 
Add the missing class and split up the handling for CDSI lookup errors to reuse 
existing error types.
2024-02-09 15:31:35 -05:00
Fedor Indutny
45d513a548
Introduce processMinidumpBuffer for Desktop 2024-02-09 09:46:55 -08:00
Alex Konradi
483d220aba Expose CDSI debugPermitsUsed in app libs 2024-02-08 15:25:33 -05:00
Alex Konradi
d08adf19bb
Return username candidates as string array
Use the string bridging code introduced previously to provide string arrays to 
client directly instead of joining and splitting. This eliminates the use of a 
magic ',' character as a delimiter.
2024-02-06 09:46:06 -05:00
Alex Konradi
11f7b0b231
Bridge message backup validation to node
Expose message backup at the bridge layer as a separate async function. Add a 
TS wrapper with the same interface as for the other app languages.
2024-02-02 14:47:05 -05:00
Alex Konradi
c70b66dc8c
Bridge message backup validator to Java
Provide a simple API for validating message backups read from InputStream 
instances.
2024-01-26 13:33:36 -05:00