Commit Graph

385 Commits

Author SHA1 Message Date
Jordan Rose
6ddd3ce184 SSK: Remove SPKProtocolContext
Brought over for convenience in the previous commit, but no longer
needed now that everything's in one framework.
2021-03-22 16:18:29 -07:00
Jordan Rose
68a27a76e2 Move AxolotlKit model classes into SSK and remove the dependency
We still need the AxolotlKit model classes to migrate old sessions,
but we don't need any of the actual protocol support. This also
means we can drop HKDFKit.

Additionally, we do still use some utilities from AxolotlKit:

- AxolotlExceptions.h: NSException names, should eventually be
  replaced by NSErrors everywhere

- NSData+keyVersionByte.h: prepend/remove public key type byte,
  should eventually be replaced by strong types (ECPublicKey)

- SPKProtocolContext.h: defines the SPKProtocol{Read,Write}Context
  marker protocols, should be replaced by direct use of
  SDSAny{Read,Write}Transaction
2021-03-22 16:17:47 -07:00
Jordan Rose
69d94a7719 SSK: Migrate TestProtocolRunner to SignalClient
Previously this manually initialized two sessions through an
AxolotlKit-provided helper. Rather than expose a similar helper for
SignalClient, TestProtocolRunner now sends an empty message in both
directions to initialize the sessions.
2021-03-22 16:10:42 -07:00
Nora Trapp
5f8f048202 Fix tests 2021-02-23 10:45:50 -08:00
Nora Trapp
91d2953843 Begone OWSMessageReceiver 2021-02-23 10:45:50 -08:00
Nora Trapp
3991802fa8 Add appropriate restrictions to when message processing can run. 2021-02-23 10:45:50 -08:00
Nora Trapp
ad6583facb Eliminate usage of decrypt job queue 2021-02-23 10:45:50 -08:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Jordan Rose
c7b6ba7010 Make OWSAccountIdFinder's methods into class methods
OWSAccountIdFinder is no longer used for dependency injection in
SignalMetadataKit, so there's no need to allocate empty NSObjects just
to call the methods.

No functionality change.
2021-01-28 12:03:50 -08:00
Jordan Rose
1ea62f2f50 SSK: Update for 'throws' removal in SignalClient 2021-01-28 12:03:50 -08:00
Jordan Rose
aeb78527ea SSK: Update for removal of SMK{Sender,Server}Certificate 2021-01-28 12:03:50 -08:00
Jordan Rose
07c20a5f6f Rename the SignalClient test protocol to avoid conflicts 2021-01-28 12:03:50 -08:00
Jordan Rose
afcfff317f SSK: Convert OWSProvisioningCipher to Swift for SignalClient HKDF 2021-01-28 12:03:49 -08:00
Jordan Rose
1705f36669 SSK: Add a test for sticker decryption 2021-01-28 12:03:49 -08:00
Matthew Chen
4ae673a043 Fix broken test. 2021-01-25 19:40:13 -03:00
Michelle Linington
52ffb5492a Fix tests 2021-01-21 16:21:59 -08:00
Jordan Rose
75f179f572 SSK: Flush DispatchQueue.main after every test
There are a lot of events that get dispatched onto the main queue
(often /from/ the main queue), and processing them during the setup
for the subsequent test can cause problems. In particular, the
notification for setting up a local number in -[OWSMessageManagerTest
test_GroupUpdate] was occasionally being processed in the subsequent
-test_GroupUpdateWithAvatar, depending on how long GRDB took to set up
in the second test.
2021-01-14 16:37:53 -08:00
Nora Trapp
b6cb720ffe Keep signed prekeys for 30 days 2020-12-22 12:37:59 -08:00
Matthew Chen
b13ff0c879 Respond to CR. 2020-10-08 17:31:29 -03:00
Matthew Chen
d364796d9d Remote obsolete remote config & feature flags around gv2. 2020-10-08 17:24:11 -03:00
Nora Trapp
3d5cded4d8 Silently migrate master key to new KBS enclave when necessary 2020-10-06 15:07:11 -07:00
Jordan Rose
3d8d96f532 Make test_messageIsSent less flaky by flushing the global queue
A synchronous barrier block will not run until all prior submitted
items run, and all of the work setting up this test is synchronously
submitted to the global background queue.
2020-09-30 12:53:32 -07:00
Nora Trapp
af822f5c5f PR Feedback 2020-09-21 12:08:36 -07:00
Matthew Chen
686aee752c Rename OWSMessageSender -> MessageSender. 2020-09-17 21:35:35 -03:00
Matthew Chen
70ff0e19c5 Fix broken tests. 2020-09-17 21:11:09 -03:00
Matthew Chen
c017e76aab Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
4c432b1ac3 Fix broken tests. 2020-09-17 17:31:23 -03:00
Matthew Chen
aea5df3625 Try to fix broken test. 2020-09-17 17:30:38 -03:00
Matthew Chen
fa96fecdcf Fix spurious test failures. 2020-09-17 17:30:38 -03:00
Nora Trapp
898155b794 Merge branch 'release/3.16.0' 2020-09-03 18:56:52 -07:00
Michelle Linington
1405e46e62 IOS-823: Add description/date to link preview model
Updates the proto definition to add a preview description and date
field. Date and description metadata from fetched content will be sent
over the wire. We can't render it locally yet, but at least this will
allow supporting recipients to display the content.

Also, made some minor changes to HTMLMetadata to better handle article
publish/modified date tags.
2020-09-03 18:19:20 -07:00
Matthew Chen
516fefb1c0 Rework the 'pending member requests and invites' view. 2020-09-03 18:33:07 -03:00
Nora Trapp
1307d7bfd9 Merge branch 'release/3.16.0' 2020-09-02 17:00:36 -07:00
Michelle Linington
e63b16a7e0 IOS-822: Support for parsing additional HTML content
This branch makes improvements to how HTML metadata is parsed. Now,
we'll parse other kinds of opengraph tags as well as title, favicon, and
meta description.

This branch also modifies how URL validation is performed. Before,
international URLs were not supported due to NSURL/NSDataDetectors
handling of punycode. Now, there are mechanisms to detect non-ASCII URLs
that have been parsed and validate that they are comprised of the
correct characters.
2020-09-02 14:50:12 -07:00
Matthew Chen
3b814d0130 Fix broken tests. 2020-09-02 16:31:42 -03:00
Matthew Chen
a20834d572 Respond to CR. 2020-09-02 13:44:15 -03:00
Matthew Chen
825cb06edb Animated sticker support. 2020-09-02 13:44:15 -03:00
Matthew Chen
a9dc905d4b Add possible support for animated lottie, webp, apng. 2020-09-02 13:44:14 -03:00
Matthew Chen
f225be338b Add possible support for animated lottie, webp, apng. 2020-09-02 13:44:14 -03:00
Nora Trapp
1457a42bdf PR Feedback 2020-08-31 12:24:24 -07:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Fumiaki Yoshimatsu
2712b4593a Fixes tests by giving a semi-bogus phone number to work around an assertion. 2020-08-28 09:43:54 -07:00
Fumiaki Yoshimatsu
5a899b02b1 Fixes tests by giving a semi-bogus phone number to work around an assertion. 2020-08-28 09:43:54 -07:00
Fumiaki Yoshimatsu
b62f94c924 Fixes a test by giving a semi-bogus phone number to work around an assertion. 2020-08-28 09:43:54 -07:00
Fumiaki Yoshimatsu
93e5503b87 Fixed two tests related to UIDatabaseSnapshotDelegate. 2020-08-28 09:42:45 -07:00
Matthew Chen
f243889d00 Use protocol contexts in prekey stores. 2020-08-25 21:31:56 -03:00
Matthew Chen
4c6f2c22b4 Use protocol contexts in prekey stores. 2020-08-25 21:31:56 -03:00
Matthew Chen
2e126d2fae Merge remote-tracking branch 'private/release/3.15.0' 2020-08-20 16:35:40 -03:00
Matthew Chen
40830ee7b0 Add test around URL composition. 2020-08-20 15:40:34 -03:00