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

2433 Commits

Author SHA1 Message Date
Sergey Skrobotov
cb3cd55c17
node: adjusting ChatService API to align with the usage patterns 2024-07-23 14:45:30 -07:00
Jordan Rose
a9b0ac2729 CI: Test building for iOS devices 2024-07-23 14:12:51 -07:00
Jordan Rose
28b9bf0951 swift: Fix building tests for a device
This isn't something we do often, but sometimes it's useful to do,
usually from the Signal-iOS workspace, to see how the real device
behaves.
2024-07-23 14:12:51 -07:00
Jordan Rose
288c1ceee7 swift: Split ComparableBackup out to a separate simulator-only file 2024-07-23 14:12:51 -07:00
Chris Eager
4a3d4aecd5 Add SealedSenderMultiRecipientMessage#serializedRecipientView
This allows a server to parse and validate a multi-recipient message once,
and then efficiently store per-recipient views for future delivery.
2024-07-23 10:16:02 -07:00
Jordan Rose
8835b7febe java: Enable Gradle dependency checksums 2024-07-22 15:56:02 -07:00
Jordan Rose
213ad4b30d
net: Add a "network changed" event
This adds a new utility type ObservableEvent, which synchronously runs
any registered callbacks when the event fires. CustomDnsResolver can
then subscribes to a "network changed" event on creation, clearing its
cache. At the other end of the stack, the ConnectionManager contains
the event, to eventually be exposed to the app languages as part of
the Net abstraction.

Additional parts of libsignal-net will subscribe to the "network
changed" event in the future. In particular, it should reset
persistent connection cooldowns.
2024-07-19 16:24:07 -07:00
Jordan Rose
d0b1821888 node: Upload dump_syms output to releases instead of raw debug info 2024-07-19 16:19:53 -07:00
Alex Konradi
8ba0f2731c Bump to version v0.52.5 2024-07-19 13:41:34 -04:00
Alex Konradi
4c0bb6d87f
Revert "android: Don't strip debug info out of the AAR" 2024-07-19 11:25:58 -04:00
Alex Konradi
d33ce0bea5 Bump version number to 0.52.4 2024-07-19 09:34:42 -04:00
Jordan Rose
5a1144b8ac java: Update code size checker to measure post-stripping size
Previously the Android libraries were stripped as part of the build,
but what we're really trying to track is the download size and
size-on-disk for Android users, so the stripped library is more
relevant (and lets us continue to compare against previous releases).
2024-07-18 14:31:20 -07:00
Jordan Rose
e50ddd215b java: ChatServiceExtension now extends IOException
...for consistency with other network-related exceptions in the Java
ecosystem.
2024-07-18 13:08:59 -07:00
Alex Konradi
0b7d2856fe
Use ResourceReader in test 2024-07-18 14:48:18 -04:00
Alex Konradi
671febbde8
java docker: set default file encoding to UTF-8 2024-07-18 14:32:12 -04:00
Jordan Rose
2319228027 android: Don't strip debug info out of the AAR
This *greatly* increases the size of the artifacts uploaded to Maven,
but it looks like the libraries do correctly get stripped when the
final APK is built. (This was not true in the past.)

Also, make sure the built library includes a "build ID", or else the
stripped version of the library will be treated as a different
library, and all the line tables will go to waste.
2024-07-18 10:26:02 -07:00
moiseev-signal
e3045d3ca3
svr3: Implement different strategies for connection failures 2024-07-18 09:47:33 -07:00
Alex Konradi
f7e0af4c30
java: read expected backup file as UTF-8 2024-07-17 15:42:19 -04:00
Alex Konradi
a6a8eae650
Fix expected canonical test case output 2024-07-16 15:40:43 -04:00
moiseev-signal
dee9c5a06e
svr3: Assorted connection handling improvements 2024-07-16 12:19:14 -07:00
Alex Konradi
f6acd4f98d
Update backup.proto to latest version 2024-07-16 14:20:53 -04:00
Alex Konradi
66cd3f0133
backup: bridge canonical serialization as ComparableBackup 2024-07-16 14:20:31 -04:00
moiseev-signal
854343294d
svr3: Make partial migration easier and add a test 2024-07-15 16:27:16 -07:00
Alex Konradi
eea07a5638
Include -testing fns in FFI on testing-fns feature 2024-07-15 14:57:40 -04:00
Alex Konradi
535241d423
backup: add canonically-serializable type
Add a type with a canonical serialized form that, for the same logical backup 
contents (even with frame reorderings), will always serialize to the same value.
2024-07-15 14:48:59 -04:00
Alex Konradi
784164d4bb
backup: Make message backup types serializable 2024-07-12 15:20:25 -04:00
Jordan Rose
07801c8153 CI: The NPM action needs perms to upload GitHub Release artifacts
Also, don't include the checksum files generated by the build process.
2024-07-11 16:32:07 -07:00
Jordan Rose
a4a0663528 Bump to version v0.52.3 2024-07-11 14:10:27 -07:00
Jordan Rose
5b63a03ecd node: Put an empty install script so node-gyp isn't invoked implicitly 2024-07-11 14:08:52 -07:00
Jordan Rose
7261c37b46 Bump to version v0.52.2 2024-07-11 12:33:46 -07:00
Jordan Rose
21ddea4135 node: If the logging channel backs up, drop logs
(and warn that we might be dropping logs)
2024-07-11 12:03:59 -07:00
Alex Konradi
eb0a8ef60e
Update to latest backup.proto definition
Notable changes:
- custom colors are now referenced indirectly
- SimpleChatUpdate changes w/ new test cases
2024-07-11 15:01:50 -04:00
Jordan Rose
efaa3c4b2f net: Remember to set the confirmation header name for proxies 2024-07-10 17:59:25 -07:00
Jordan Rose
1e8b7388e3 net: Avoid hot loops in reconnect
This can happen if we get into an error state, or if we have a bug
that has the connection attempt early-exit. We don't want to spin in
place trying to connect.
2024-07-10 17:59:17 -07:00
Alex Konradi
6d3c1b057f
Add libsignal-bridge-testing for Swift
Use a similar strategy as for Node, but with an additional crate that serves as 
the target for running cbindgen. The expectation is that since iOS links with 
the native signal_ffi statically, the linker will be able to prune out the 
unsued test-only code.
2024-07-10 17:45:53 -04:00
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