Commit Graph

863 Commits

Author SHA1 Message Date
Andrew
4c75abcac3 Reset for version v0.79.1 2025-08-21 15:17:44 -04:00
Jordan Rose
c905320dea bridge: Add IllegalArgumentError
...mostly so we can stop using SignalProtocolError::InvalidArgument
for functions that wouldn't otherwise traffic in SignalProtocolErrors.
2025-08-18 10:47:34 -07:00
Jordan Rose
6cfdd92d93 java: Fix order of arguments to assertEquals in assertLookupErrorIs 2025-08-18 10:00:42 -07:00
Jordan Rose
549d91aba3 net: Fold cdsi::LookupError::Parse into CdsiProtocol
Both of these indicate the server sending something unexpected, and
all clients already treat them the same at the app level anyway.
2025-08-18 10:00:42 -07:00
Jordan Rose
ddb8f340ca Remove unused cdsi::LookupError::InvalidResponse 2025-08-18 10:00:42 -07:00
Jordan Rose
8fdb2778bc protocol: Split FingerprintError out from SignalProtocolError
The "fingerprint" / safety number operations *are* tied to the
"protocol" in that they provide a way to verify identity keys, but
they are also completely distinct from the message handling that the
rest of SignalProtocolError is used for.
2025-08-15 12:21:25 -07:00
Alex Bakon
912d75d3b5 Reset for version v0.78.4 2025-08-15 09:58:52 -04:00
Jordan Rose
9e2bcb2a74 SVRB: Distinguish "automatic retry" from "manual retry" errors
- Java: This distinction is already made, just reworded

- Node: We include "protocol errors" in IoError here, where retrying
  probably won't help, but it won't really be harmful either.

- Swift: Automatically retryable errors are now enumerated; other
  errors are still described as "manually retryable". (Also, fixed a
  redundant error message format call.)
2025-08-14 16:14:12 -07:00
Jordan Rose
54e81cda4f java: System.runFinalization() in GC cleanup testing
This makes this particular test more reliable even though no
'finalize' methods are involved in this one.
2025-08-13 13:31:23 -07:00
Jordan Rose
b4cd040474 Add SvrB.remove(), use it for app-level integration tests 2025-08-13 12:35:52 -07:00
Jordan Rose
374301ab46 java: Include a timestamp in the testing StderrLogger
Before
> I libsignal: rust/bridge/shared/types/src/net.rs:132: Initializing connection manager for Staging...

After
> [11:03:32.956965 libsignal] I rust/bridge/shared/types/src/net.rs:132: Initializing connection manager for Staging...
2025-08-13 11:43:12 -07:00
Jordan Rose
7bae76f25e java: Use the slightly-nicer StderrLogger in TestLogger 2025-08-13 11:43:12 -07:00
Jordan Rose
996f6bb250 jni: explicitly clean up local refs on background threads
- Use a local frame for bridge_io when completing futures
- Use a local frame for ChatListener callbacks
- Use AutoLocal for exception formatting callbacks
2025-08-12 10:49:30 -07:00
moiseev-signal
b53ed51263 keytrans: Stop falling back to search if _self_ monitor detects a new version 2025-08-11 15:34:01 -07:00
Alex Bakon
1f923dcd88 Remove unused TransportConnectError::DnsError 2025-08-11 09:45:02 -04:00
Jordan Rose
ea343a89ab jni: Native.java -> Native.kt
Improvements included in this first iteration:
- Nullable/non-nullable!
- ObjectHandle typealias for Long
- Fixed handling for CompletableFuture<Void> (previously translated
  without generics at all in some cases)

Co-authored-by: Alex Bakon <akonradi@signal.org>
2025-08-08 14:41:22 -07:00
Jordan Rose
1d67bed3ed Gradle: Consolidate allprojects + subprojects down to one block 2025-08-08 14:40:35 -07:00
Jordan Rose
969f9304a5 Reset for version v0.78.3 2025-08-08 14:20:19 -07:00
Jordan Rose
36916db152 Gradle: Make Spotless a top-level task, be precise about inputs
Previously, we used a per-project directory glob for Kotlin and Java
sources, which (1) was overly general, (2) ran afoul of Gradle's rules
about "if you look in a directory you must depend on it", and (3)
required us to make a fake subproject in the shared/ folder because
Spotless doesn't like sources outside the project directory.

Now, we delay complete evaluation of the root project until
subprojects are complete, and then add a single Spotless operation at
the top level that uses the subprojects' compile tasks to find exactly
the files to format.
2025-08-08 13:08:31 -07:00
Jordan Rose
fd8322b53e SVRB: Clarify what "chain" refers to in the doc comments 2025-08-07 17:28:02 -07:00
Jordan Rose
51a4bfa614 Gradle: drop leftover support for building with a pre-11 JDK 2025-08-07 15:58:03 -07:00
Jordan Rose
aee436a43c java: Update Spotless to 7.2.1 2025-08-07 13:46:28 -07:00
Jordan Rose
d3112cc349 java: Provide (and document) more specific exceptions for SVR-B 2025-08-06 17:18:31 -07:00
Jordan Rose
3b91a5d708 net: Parse RetryLater info for SVR-B
Essentially, promotes "decide whether an HTTP status is interesting"
up to the generic "enclave" handling instead of being CDS-specific,
and then propagates the new case all the way out to apps.
2025-08-06 16:05:28 -07:00
Max Moiseev
a357e1c8f4 Reset for version v0.78.2 2025-08-06 11:28:06 -07:00
Jordan Rose
9feb3de9d2 net: SvrError::ConnectionTimeout -> AllConnectionAttemptsFailed
The same error is being used both for timeouts and for "all attempts
failed"; if we're going to coalesce them (reasonable, given that the
only option in either case is "retry" or "don't"), "all attempts
failed" is a less misleading choice.

This changes the particular enum case in Swift from connectionTimedOut
to connectionFailed. Java continues to use NetworkException and
TypeScript the IoError code.
2025-08-01 14:02:54 -07:00
Jordan Rose
59ce2f3f0c Reset for version v0.78.1 2025-07-31 14:00:29 -07:00
Jordan Rose
be9e9a3ab6 Expose SvrB.createNewBackupChain(), make secret data non-optional 2025-07-31 12:37:02 -07:00
andrew-signal
4cff0b3911 Remove the timeout from testToResultFutureCancellationPropagation so it flakes less. 2025-07-31 15:33:15 -04:00
gram-signal
72935510d4 Immediately after a restore, use the same enc_salt/pw_salt for the next backup.
Co-authored-by: Jordan Rose <jrose@signal.org>
2025-07-30 20:14:26 -07:00
Andrew
b76a09d9c7 Reset for version v0.77.2 2025-07-29 20:31:28 -04:00
andrew-signal
f9ca652baf Extend testToResultFutureCancellationPropagation baseFuture.await() timeout 2025-07-29 19:05:23 -04:00
Alex Bakon
bb05cc016e Streamline bridging of SVR-B function arguments 2025-07-29 14:18:16 -04:00
Andrew
b7ebe6833b Reset for version v0.77.1 2025-07-28 19:10:50 -04:00
andrew-signal
d70f913780 Skip non-hermetic SVR-B tests if username or password is not set 2025-07-28 18:51:30 -04:00
andrew-signal
3055e8e2b3 Bridge SVR-B to Kotlin 2025-07-28 18:05:13 -04:00
Jordan Rose
9e9c375db9 Expose BackupForwardSecrecyToken-aware MessageBackupKey derivation 2025-07-28 13:53:19 -07:00
andrew-signal
5bdc3e54f2 Expect correct kind of exception in testConnectCancellationUnauth 2025-07-25 19:31:43 -04:00
Alex Bakon
303b6313bd Expose SVR-B logic from Rust 2025-07-25 17:36:12 -04:00
Jordan Rose
d225a1008d Add CompletableFuture.handle
Co-authored-by: Andrew <andrew@signal.org>
2025-07-25 14:09:07 -07:00
Jordan Rose
a881fcf0f3 java: Align CompletableFuture cancellation behavior with OpenJDK's 2025-07-25 13:24:29 -07:00
gram-signal
3ae977841f Modify backup forward-secrecy-token storage to be more resilient to SVRB communication failures.
Co-authored-by: Alex Bakon <akonradi@signal.org>
2025-07-25 12:35:01 -07:00
andrew-signal
47a4eeabb5 Bridge BackupForwardSecrecyToken to Swift/Kotlin/TypeScript 2025-07-23 19:57:16 -04:00
andrew-signal
ec3c273219 Expose Rust API for SVR-B 2025-07-23 18:59:54 -04:00
Alex Bakon
c913c90aca Reset for version v0.76.8 2025-07-22 16:56:33 -04:00
Alex Bakon
7aef688310 Split Base64 utility to reduce reflection 2025-07-22 15:33:22 -04:00
Max Moiseev
fa287c9fdd Reset for version v0.76.7 2025-07-21 18:04:47 -07:00
Jordan Rose
69f1a54f0c Reset for version v0.76.6 2025-07-18 09:59:41 -07:00
Jordan Rose
821dee54e5 java: Add CompletableFuture.completedFuture()
Matches java.util.concurrent.CompletableFuture's method.
2025-07-17 18:27:39 -07:00
Jordan Rose
04e9d83995 MessageBackupValidationTest.java: "expected, actual" in assertEquals 2025-07-17 10:57:29 -07:00