Commit Graph

68 Commits

Author SHA1 Message Date
Ehren Kret
557d6a67cc migrate Cryptography over to swift
`srand` is not accessible in swift. Remove `srand` anyhow as anything
using `rand` for any actual randomness should be considered a bug in
need of fixing rather than viewing `srand` as an acceptable workaround.
2024-08-01 14:43:34 -05:00
Max Radermacher
5fa7eddd0b
Use the Aci type when handling gv2 messages 2024-07-31 18:30:02 -05:00
Max Radermacher
f2eb7f5a22
Extract LinkPreviewFetcher into its own type 2024-07-26 21:45:22 -05:00
Jordan Rose
9a3377216d Update to libsignal 0.54.0
Includes code changes for libsignal splitting ChatService into
AuthenticatedChatService and UnauthenticatedChatService, which is more
in line with how iOS does things anyway. Also now supports receiving
stories on the auth connection using libsignal.
2024-07-26 17:16:56 -07:00
Max Radermacher
2344354d2b
Consolidate “download too large” code 2024-07-25 02:37:38 -05:00
Max Radermacher
664b7781fe
Asyncify GroupV2Updates 2024-07-25 02:17:01 -05:00
Max Radermacher
a56b9e9be5
Pass around GroupSecretParams instead of Data 2024-07-25 02:12:07 -05:00
Max Radermacher
f3423d64f8
Move some GroupsV2 methods to better places 2024-07-25 02:02:32 -05:00
Max Radermacher
3af389bda8
Clean up OWSUrlSession error handling 2024-07-11 10:53:19 -05:00
Max Radermacher
9d571cf6d7
Avoid forced downcast that’s not necessary 2024-07-11 10:37:45 -05:00
Max Radermacher
201b9c36dc
Remove unused REST feature flag 2024-07-11 10:37:25 -05:00
Max Radermacher
793aa38c54
Compare SSKWebSocket objects instead of IDs 2024-07-11 10:35:48 -05:00
Max Radermacher
17f539fddc
Remove confusing Optionals from comparison check 2024-07-11 10:34:47 -05:00
sashaweiss-signal
29c9f74aca Enable the delete-sync capability for all users 2024-07-10 13:23:01 -07:00
Adam Sharp
a7dae0e859
Remove NSE feature flag and unused VOIP token registration code 2024-07-10 09:40:13 -04:00
Adam Sharp
d5b8ec648d
Remove simple availability checks for iOS 15 2024-07-10 09:40:13 -04:00
Adam Sharp
34a8cf2bda
Rename owsAssert to owsPrecondition 2024-07-09 10:42:56 -04:00
Adam Sharp
c2fd39a95c
Switch from deprecated UTI functions to UTType 2024-07-08 10:17:08 -04:00
Max Radermacher
d8785da0b7
Don’t wait for the web socket in the NSE 2024-06-27 14:07:38 -05:00
Max Radermacher
c748618219
Adjust property that tracks unknown devices 2024-06-26 12:51:23 -05:00
sashaweiss-signal
514572d7a1 Temporarily re-restrict delete sync to internal 2024-06-26 10:00:51 -07:00
Harry
bb083ca39c
Fold SignalCoreKit into SignalServiceKit
Co-authored-by: Adam Sharp <sharplet@signal.org>
2024-06-26 08:44:41 -07:00
Sasha Weiss
e13e4c34e3
Enable the delete-sync capability for all users 2024-06-25 16:57:36 -07:00
Max Radermacher
63bd233f7d
Don’t cycle sockets when changing number 2024-06-25 14:12:24 -05:00
Chris Eager
7d088336fb Remove challenge option 'recaptcha' 2024-06-24 16:15:22 -05:00
Sasha Weiss
2769166d79
Add outgoing support for non-expiring messages in delete-sync messages 2024-06-21 12:14:27 -07:00
Jordan Rose
54e4f752c9 Add OWSAuthConnectionUsingLibSignal
This is a *subclass* of OWSChatConnectionUsingLibSignal, mainly
because the authenticated/identified connection really does have
capabilities the unauth/unidentified one does not, and splitting those
out makes it easier to see which are which.

For now each websocket connection, identified and unidentified, has
its own libsignal ChatService instance, even though ChatService is
designed to manage both connections together. Later on in the
migration it'll make sense to consolidate them, but under the existing
structure of OWSChatConnection this is the easiest way to manage their
lifecycles.

Controlled by new RemoteConfig flag
"ios.experimentalTransportEnabled.libsignalAuth" (and for local
testing, UserDefaults flag UseLibsignalForIdentifiedWebsocket).
2024-06-20 15:42:00 -07:00
Sasha Weiss
180a288401
Enable the delete-sync capability for internal users 2024-06-18 09:55:55 -07:00
Sasha Weiss
d193a937c8
Add a capability to enable sending DeleteForMe sync messages 2024-06-13 11:12:05 -07:00
Jordan Rose
1661eb780b OWSChatConnectionUsingLibsignal: Add proxy support 2024-05-31 12:24:51 -07:00
Adam Sharp
c675ec09c7
Resolve designated initializer warnings in SignalServiceKit 2024-05-28 10:47:15 -04:00
Adam Sharp
f245dcc2d7
Address unused variable warnings in SignalServiceKit 2024-05-22 12:04:52 -04:00
Jordan Rose
0ac5558493 Move libsignal-net proxy handling into SignalProxy
Since this already affects more than just the chat connection, having
it in OWSChatConnection isn't really the best choice. This way we can
be sure the libsignal Net instance's proxy settings will be updated
before any notifications go out.
2024-05-17 16:20:13 -07:00
Jordan Rose
9defb935a0 0 is not a valid TLS proxy port 2024-05-17 16:20:13 -07:00
Max Radermacher
3526c2b650
Remove unused canBuildWebSocket 2024-05-17 13:53:08 -05:00
Sasha Weiss
47c6f80c27
Track which field is missing in SDSError.missingRequiredField 2024-05-16 12:38:13 -07:00
Jordan Rose
6363dc07d1 OWSChatConnectionUsingLibSignal: 7a396ba9f, again 2024-05-13 10:18:08 -07:00
Jordan Rose
401d55d751 OWSChatConnection: Handle TLS proxies for libsignal shadowing 2024-05-03 17:36:29 -07:00
Max Radermacher
1ceab3701a
Remove unused tld property 2024-05-03 12:46:10 -05:00
Max Radermacher
6f4fbd37cb
Fetch profiles in the NSE 2024-05-02 15:32:14 -05:00
Jordan Rose
7e98708fdd Revert "OWSChatConnection: disable shadowing requests under CC"
libsignal 0.45.1 makes this work correctly.

This reverts commit f78a4dfaa5.
2024-05-02 10:57:55 -07:00
Pete Walters
49608a64e6
Add backup download
Co-authored-by: Harry <109690906+harry-signal@users.noreply.github.com>
2024-04-30 17:09:31 -05:00
Jordan Rose
4a0879eb78
Add OWSChatConnectionUsingLibsignal
The choice of whether or not to use this is controlled by a
RemoteConfig flag, ios.experimentalTransportEnabled.libsignal, but
because ChatConnectionManager is set up before RemoteConfig has even
loaded its cached settings, the flag is cached in UserDefaults, like
the shadowing kill switch setting.
2024-04-26 13:13:48 -07:00
Pete Walters
5bc53062c6
Request backup auth credentials and make initial requests. 2024-04-26 09:40:42 -05:00
Sasha Weiss
c26ad8a4e5
Add an "inactive linked device" megaphone 2024-04-24 11:28:33 -07:00
Jordan Rose
f78a4dfaa5 OWSChatConnection: disable shadowing requests under CC
The previous comment describes the planned behavior, but it isn't
actually working yet.
2024-04-22 10:01:13 -07:00
Jordan Rose
4afddfe93d
Add a RemoteConfig flag to turn off libsignal unauth request shadowing
It's not likely we'll need this, but just in case.
2024-04-22 10:00:54 -07:00
Jordan Rose
c3da50e5d5 OWSChatConnection: Bump the libsignal shadowing timeout to 3sec
Most requests on good networks happen well under 2sec, but there have
been a few timeouts that seem spurious (distinct from a series of
timeouts all happening in a row on the libsignal websocket).
2024-04-22 09:49:58 -07:00
Max Radermacher
a241f40621
Fix a few build warnings 2024-04-17 19:11:13 -05:00
Max Radermacher
e9cdafcff4
Format sender certificate parameters correctly 2024-04-17 17:40:56 -05:00