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

269 Commits

Author SHA1 Message Date
Jordan Rose
5436160313 Bump to version v0.39.2 2024-01-18 16:04:39 -08:00
Jordan Rose
bf6ef9063c Node: Expose SealedSenderMultiRecipientMessage parsing
...for testing purposes (@signalapp/mock-server).
2024-01-18 14:55:14 -08:00
Jordan Rose
f7e133b28e Node: Run prettier on the fixed part of Native.d.ts 2024-01-18 14:55:14 -08:00
Jordan Rose
b31ca0781c Remove length parameter for webpsan
The way images are displayed on Android makes it annoying to provide,
and the implementation of webpsan doesn't actually need it.
2024-01-18 12:36:31 -08:00
Alex Konradi
83e3722783
Upgrade dependencies
Update to semver-compatible versions of all crates. Prevent duplicate
versions of crates by updating
- http to v1.0.0
- indexmap to v2.1.0

Run `yarn upgrade`
2024-01-12 14:52:28 -05:00
Jordan Rose
d0879d7150 Bump to version v0.39.1 (Node-only release) 2024-01-10 17:18:20 -08:00
Jordan Rose
e2106b6184 Node: The prebuild Docker image only works as an x86_64 guest 2024-01-10 17:16:11 -08:00
Jordan Rose
a5a2b42046 Node: Specifically build with prebuildify@^5
prebuildify 6.0.0, just released, changed the name of the built
module, which our locked version of node-gyp-build then couldn't find.
By specifying a version in package.json and making sure we always
`yarn install` before running prebuildify, we'll use the version from
our lockfile, and never accidentally update to a new major version.
2024-01-10 17:16:11 -08:00
Jordan Rose
455b3bf7a0 Bump to version v0.39.0 2024-01-10 13:17:40 -08:00
Jordan Rose
70a9662acd usernames: Expose Username.fromParts to app languages 2024-01-10 12:26:19 -08: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
Jordan Rose
4a69727457 Bump to version v0.38.0 2024-01-05 11:04:43 -08:00
Jordan Rose
31babcbd68 Bump to version v0.37.0 2023-12-13 15:57:14 -08:00
Jordan Rose
88a25e889e Collect acknowledgments for libsignal's Cargo dependencies 2023-12-11 16:39:33 -08:00
Jordan Rose
0d09a8352c
Add GroupSendCredential
This credential is issued by the group server and presented to the
chat server to prove that the holder is a member of *some* group with
a known list of people. This can be used to replace the access key
requirement for multi-recipient sealed sender sends.
2023-12-11 13:45:12 -08:00
Jordan Rose
16653ffea1 SSv2: Add send support for excluded recipients 2023-12-11 12:36:54 -08:00
Jordan Rose
1edbdfcc70 node: Add some assertions to match the other platforms' tests 2023-12-08 12:11:25 -08:00
Max Moiseev
126f87b73c Bump to version 0.36.1 2023-12-06 15:20:54 -08:00
Jordan Rose
b7bbabd228 Bump to version v0.36.0 2023-12-05 13:00:53 -08:00
Alex Konradi
1f2d761889
Allow returning handle types from Swift invokeAsyncFunction
Implement the Completable protocol for OpaquePointer and add a test that runs
futures that return handle types to prove that it works.
2023-12-04 16:39:32 -05:00
Alex Konradi
f06faef7a4
Split CDSI lookup to allow token retrieval
Split the libsignal-net implementation of CDSI lookup into two parts: one that
does the initial handshake and token acquisition, and the other to acknowledge
the token and then parse results. Expose the token in Java via the same Consumer
type used in the Android codebase.
2023-12-01 16:05:10 -05:00
Alex Konradi
4c78373114
Expose libsignal-net function for CDSI via JNI
Expose the existing CDSI lookup async function to Java clients. Provide a small
library that can be easily integrated into the existing codebase.
2023-11-15 10:00:46 -05:00
Jordan Rose
3b6100eb1d Bump to version v0.35.0 2023-11-13 10:39:59 -08:00
Jordan Rose
8fd34ff3c6 Node: Update to ES2020
We were formally targeting ES2015 and relying on TypeScript desugaring
the use of newer features like async/await, which is unnecessary.
Desktop targets ES2020; we can too. One thing TypeScript was *not*
desugaring was BigInt literals, which we can now use freely.
2023-11-08 09:11:09 -08:00
Max Moiseev
611deac10d Bump to version 0.34.0 2023-11-03 11:46:38 -07:00
akonradi-signal
89630ece20
Fixes for CDSI lookup in node
Fix issues that made this harder to use in client libraries:

- mutable arguments made Net.cdsiLookup harder to call
- a missing error code field made discriminating a RateLimitedError un-idiomatic
2023-11-03 13:37:14 -04:00
Jordan Rose
d5cd742e73 Update Node to 18.15.0, node-gyp to 10.0.1, and yarn upgrade 2023-11-02 16:55:37 -07:00
Jordan Rose
d768f47020 usernames: Allow generating a new link buffer with existing entropy
This allows updating the encrypted username associated with a link
without rotating the link itself.
2023-11-02 15:02:36 -07:00
akonradi-signal
e0465badb6
Add CDSI lookup bridge code for node
Use the async CDSI lookup function introduced in libsignal-net and expose it via
the bridging layer to node. Add a typescript library that provides a more
convenient interface for callers and exposes a close-to-drop-in-compatible API
for the desktop client.
2023-11-02 16:33:24 -04:00
Jordan Rose
37c7b482ca Bump to version v0.33.0 2023-10-26 14:03:22 -07:00
Jessa
7af14c6b06
Add WebP sanitizer
This adds integration bits for the new webpsan, a WebP image sanitizer -- which
currently simply checks the validity of a WebP file input, so that passing a
malformed file to an unsafe parser can be avoided. The integration pretty much
just leverages the integration work that was already done for mp4san.
2023-10-26 15:16:59 -04:00
ravi-signal
790db2383e
zkgroup: add backup auth credential
Allows a client to request a credential for a backup-id without
revealing the backup-id to the issuing server. Later, the client may use
this to make requests for the backup-id without identifying themselves
to the server.
2023-10-25 17:26:58 -05:00
Jordan Rose
90bbc3b156 Install git in the Node Dockerfile to satisfy boring-sys
boring-sys expects git to be present to apply patches, even though we
don't actually have any patches to apply.
2023-10-18 09:50:17 -07:00
Jordan Rose
55a1958a15 Test various error and panic scenarios for bridge_fn and bridge_io 2023-10-12 12:23:22 -07:00
Jordan Rose
25ca7cc1f7 bridge: Implement bridge_io for Node/Neon
bridge_fn already supported async functions for Node, by running them
on the Node microtask queue using the work in the signal_neon_futures
crate. This PR fits that into the AsyncRuntime trait added for
bridge_io, allowing async bridge_fn and async bridge_io to share code
and the same basic structure when compiling for Node.
2023-10-05 10:07:26 -07:00
moiseev-signal
840a1906c7
Update prost to version 0.12 2023-09-20 14:00:54 -07:00
Alex Konradi
d1f9dff273 Bump to version v0.32.1 2023-09-20 14:26:31 -04:00
moiseev-signal
62657f2f51
Implement new logic for incremental mac chunk size 2023-09-13 14:33:37 -07:00
Max Moiseev
72f046fe19 Bump to version v0.32.0 2023-09-01 13:43:06 -07:00
moiseev-signal
6abe26a0c1
Improve incremental MAC API 2023-08-31 15:28:39 -07:00
Jordan Rose
9aad792fc6
Update all the RustCrypto crates 2023-08-25 11:28:49 -07:00
Jordan Rose
024c618f20 protocol: Throw SessionNotFound for an expired unacknowledged session
For the most part this should happen transparently without any
explicit adoption, like the previous change, but for Java code the
NoSessionException is now properly declared on SessionCipher.encrypt.
(This was always technically possible, but clients were expected to
have previously checked for session validity before using
SessionCipher; now that there's an expiration involved, that's not
strictly possible.)
2023-08-22 17:00:35 -07:00
Jordan Rose
a04c4f27a6 protocol: Check expiration in hasSenderChain/hasCurrentState
And consolidate the implementations of these two separate checks; now
they both check for a valid session by looking for a sender chain
instead of just *some* current session, in addition to the new check
for an expired unacknowledged session. At the Rust level, this is now
one check named has_usable_sender_chain; at the app levels, the old
names of hasSenderChain (Java) and hasCurrentState (Swift, TypeScript)
have been preserved.

Tests to come in the next commit.
2023-08-22 17:00:35 -07:00
Jordan Rose
9ca91fe2c0 protocol: Record the timestamp when a pre-key bundle is processed 2023-08-22 17:00:35 -07:00
Max Moiseev
32f53a7894 Bump to version v0.31.0 2023-08-09 15:26:47 -07:00
Jordan Rose
24f6c6bc20 Bump to version v0.30.2 2023-08-03 10:50:59 -07:00
Jordan Rose
602a21c17d Node: Tweak TypeScript tricks for producing subclass-typed values
The compiler will actually check these, which unfortunately does lead
to a case where the compiler *cannot* check them and we have to use
'as'.
2023-08-02 17:51:23 -07:00
Jordan Rose
ff81905fc6 Add senderAci() to SenderCertificate and DecryptionResult
Like ProtocolAddresses in 88a2d5c, these APIs will eventually only
support ACIs, so introducing strong types now helps move in that
direction. However, the existing APIs that produce strings have not
been removed yet.
2023-08-02 17:51:23 -07:00
Jordan Rose
45fb135880 Add {Aci,Pni}.parseFromServiceId{String,Binary}
These work the same as the equivalent factory methods on ServiceId,
but throw if the resulting parsed ServiceId doesn't match the specific
type you were trying to parse.
2023-08-02 17:51:23 -07: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