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

2498 Commits

Author SHA1 Message Date
moiseev-signal
89547673af
Quick-fix for the race between auth and unauth ws connectors 2024-07-10 14:11:32 -07:00
Alex Konradi
7af57ad1dd
backup: make recipient type vary with method
This replaces the recipient ID, which is a weak logical reference to external 
data, with one of two types, depending on the mode. For streaming validation, 
only the minimal data is kept. For validation via the CLI or (soon) for 
canonicalization, the full data is kept behind an Arc.
2024-07-10 17:07:34 -04:00
moiseev-signal
f794998389
SVR3: implement migrate API 2024-07-10 11:40:56 -07: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
5816c03a2f
Use zerocopy for safe transmutes 2024-07-10 09:30:51 -04:00
Jordan Rose
36c6eebc0e node: Remove "install" script that invokes node-gyp-build
- For local development, this built the Rust library automatically
  when you invoked `yarn install`, whether you wanted it to or not.

- For the published package, this either did nothing (if the correct
  prebuilds were present) or produced a weird error (if they weren't).
  You can't use the published package without prebuilds, so maybe this
  was useful, but you'd find that out pretty quickly when loading the
  module failed.

- If you used the "link" feature to build Signal Desktop with a local
  checkout of libsignal, this would build the Rust library
  automatically when you `install`ed in the *Desktop* directory,
  whether you wanted it to or not.

- If you pointed Signal Desktop at a local checkout by copy instead of
  link, this would just fail, because the Rust parts wouldn't be
  copied with it.

Overall, it's simpler to just have this step be explicit.
2024-07-09 18:04:14 -07:00
Jordan Rose
773530ecd1 Add type annotations to all our Python scripts
The main benefit of this is not our *own* type-checking; it's that
mypy will error out if you try to use a too-new Python API. And in
fact, we were already relying on Python 3.9 and didn't realize.

check_code_size.py works with JSON, so it still uses Any a fair bit.
2024-07-09 17:01:10 -07:00
Jordan Rose
377ca153ab node: Attach debug info to the GitHub Release 2024-07-09 17:00:36 -07:00
Jordan Rose
9aa5d07c10 node: Build with (split) debug info
We don't save that debug info anywhere yet, but it's a start!
This is following the pattern of build-electron in RingRTC.
2024-07-09 13:26:21 -07:00
Alex Konradi
0e4d420f69
Add libsignal-jni-testing crate with test-only functions for Java
This parallels the exiting libsignal-jni crate but exports functions from 
libsignal-bridge-testing instead of libsignal-bridge. The crate is compiled as 
a separate shared object that is included in the published libsignal package, 
but which can be excluded at Android packaging time.
2024-07-09 13:07:36 -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
Jordan Rose
2feac3495b swift: Replace last use of NSLog with new logging protocol 2024-07-08 14:49:22 -07:00
moiseev-signal
c870e23a5b
svr3: Implement restore with fallback function 2024-07-08 14:03:51 -07:00
Max Moiseev
4694d0a1a8 svr3: Support latest tpm2snp enclave 2024-07-08 14:03:10 -07:00
Max Moiseev
562f03abda attest: Stop validating PCR5 for tpm2snp 2024-07-08 14:03:10 -07:00
Alex Konradi
9355467f01 Add documentation for bridge crates
Explain the difference between libsignal-bridge and libsignal-bridge-types, and
how the pieces fit together.
2024-07-08 15:51:29 -04:00
moiseev-signal
b9efb3cc1b
Regenerate acknowledgements 2024-07-01 15:25:02 -07:00
Max Moiseev
2b48d18d23 Bump to version 0.52.1 2024-06-28 15:16:18 -07:00
Alex Konradi
a9868eccff
Bump NPM publish workflow macOS image version 2024-06-28 15:09:37 -07:00
Alex Konradi
e13e3de8b2 Bump to version v0.52.0 2024-06-28 14:55:58 -04:00
Alex Konradi
4cce5633d1
Avoid calling AsyncRead::read with empty target 2024-06-28 10:11:57 -04:00
Chris Eager
f26fd13631 Add SealedSenderMultiRecipientMessage#serialized 2024-06-26 17:01:01 -05:00
Sergey Skrobotov
4243979826
net: support status codes when responding to server messages 2024-06-26 14:40:04 -07:00
Alex Konradi
fc4e1dbcd6
Switch to JSON5 for backup .jsonproto parsing 2024-06-26 15:35:40 -04:00
Alex Konradi
ff864cce4d
Refactor gen_{ts,java}_decl.py
No behavior change, just moving code into named functions to improve 
readability and maintainability, and applying some Python conventions.

Co-authored-by: moiseev-signal <122060238+moiseev-signal@users.noreply.github.com>
2024-06-26 15:05:21 -04:00
Alex Konradi
bb44874400
Use a single source of truth for version file list 2024-06-26 14:11:04 -04:00
Harry
72aae8c00f
Remove SignalCoreKit dependency in libsignal 2024-06-26 09:44:22 -07:00
moiseev-signal
b85148cc1f
svr3: Implement query function 2024-06-25 14:27:09 -07:00
Alex Konradi
b064ec78c5
Upgrade rustc to latest nightly 2024-06-25 11:31:59 -04:00
Alex Konradi
49f9fa5498
Use --no-fail-fast for cargo test
Fix slow tests workflow
2024-06-24 12:45:37 -04:00
Chris Eager
2b5b51c7b3 Fix error string whitespace 2024-06-21 16:34:27 -07:00
Jordan Rose
6313b9715b ffi: Simplify error attribute getters using trait methods
It ought to be possible to go even further and use bridge_fn for these
now as well, but this is a start.
2024-06-21 16:34:13 -07:00
Jordan Rose
2a2ef524d2 Update to Node 20.11.1 2024-06-21 14:35:17 -07:00
Jordan Rose
628b849de0 bridge: ChatListeners should prioritize cancellation over events
This makes it easier to write tests for replacing listeners.
2024-06-21 14:35:17 -07:00
Alex Konradi
5b4570625b
Split types out of libsignal-bridge crate
Separate `libsignal-bridge` into two crates:
- `libsignal-bridge-types`, which contains types and methods for bridging,
  declares conversion traits, and implements those traits
- `libsignal-bridge`, which defines `extern "C"` functions that get exported
  into the app-language libraries

This will allow creating a second test-only crate, parallel to
`libsignal-bridge`, that can use the same types and macros for exporting
functions.
2024-06-21 16:39:14 -04:00
Alex Konradi
05c86172ec
Run cargo with --keep-going/--no-fail-fast in CI 2024-06-21 14:53:26 -04:00
Jordan Rose
db18a102f2 Use Docker's ADD command for remote resources 2024-06-21 11:35:08 -07:00
Alex Konradi
aeeba5e676
Track ad-hoc calls in message backups 2024-06-21 13:21:25 -04:00
Jordan Rose
2e2896fc23 Bump to version v0.51.1 2024-06-20 17:02:58 -07:00
Fedor Indutny
4f4669ed23 node: update prebuildify to 6.0.1 2024-06-20 15:41:43 -07:00
Jordan Rose
fc5a12834b net: Fix inverted boolean propagating fatal errors in reconnect 2024-06-20 15:23:58 -07:00
moiseev-signal
b463c510c1
net: Add proxy-f config for staging 2024-06-20 12:06:22 -07:00
moiseev-signal
e88138ef72
Use constant instead of hex literal for acceptable advisories 2024-06-20 12:05:51 -07:00
Jordan Rose
8bca9ace30 Update curve25519-dalek 2024-06-20 12:04:44 -07:00
Jordan Rose
44ff1e74e6 Update to a slightly newer rustc 2024-06-20 12:04:44 -07:00
Jordan Rose
8c05c03aa7 Update cargo-about
This includes a new metadata parser that is expected to be more
accurate.
2024-06-20 12:04:44 -07:00
Alex Konradi
66436b7c48
Remove unused dependencies 2024-06-18 16:05:21 -04:00
Jordan Rose
95bf4e7715 Bump to version v0.51.0 2024-06-13 16:42:29 -07:00
Jordan Rose
86c07ee86a bridge: Remove SignalFfiError enum
Now there's a trait, FfiError, which handles conversion to a string
and numeric code, and a helper struct SignalFfiError that mostly just
wraps `Box<dyn FfiError>`. This makes it easier to add new errors --
they only need to be added in two places (a trait impl and possibly
new error codes) instead of three.
2024-06-13 16:00:00 -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