Commit Graph

96 Commits

Author SHA1 Message Date
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
4b77df38fa Refine names. 2021-08-18 15:01:04 -03:00
Matthew Chen
fb549a95ea Refine error localizedDescription. 2021-08-18 15:01:03 -03:00
Matthew Chen
e13657952b Respond to CR; fix broken tests. 2021-08-18 14:26:20 -03:00
Matthew Chen
05bf2b86b9 Clean up ahead of PR. 2021-08-18 14:25:40 -03:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Matthew Chen
ccd2cedbc8 Apply LRUCache everywhere. 2021-06-30 16:01:08 -03:00
Nora Trapp
3a431c25f4 Disable unnecessary job queues from running in extensions 2021-06-24 12:20:46 -07:00
Matthew Chen
718120f725 Fix test imports. 2021-06-07 11:41:43 -04:00
Matthew Chen
37052a302a Fix build warnings around imports. 2021-06-07 11:11:30 -04:00
Michelle Linington
21f0fcb2ff Fixes broken tests related to the GroupMembers table
The TSGroupMember table is updated after every inserted interaction. It
asserts that the sender of the interaction is in the group membership.

Before, our tests would construct groups with mock membership and then
construct outgoing messages with the local address as the sender. This
would fail this new requirement.

The fix is to make sure that the local address is in the test group
membership if we'd like to "send" any messages.
2021-05-06 15:45:42 -07:00
Matthew Chen
211b93581b Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Nora Trapp
3d5cded4d8 Silently migrate master key to new KBS enclave when necessary 2020-10-06 15:07:11 -07:00
Nora Trapp
af822f5c5f PR Feedback 2020-09-21 12:08:36 -07:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03: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
f225be338b Add possible support for animated lottie, webp, apng. 2020-09-02 13:44:14 -03:00
Matthew Chen
85929d083a Revisit resumable attachment uploads. 2020-08-19 10:44:47 -03:00
Michelle Linington
5da0078bbe Run precommit script 2020-08-13 15:08:12 -07:00
Michelle Linington
18ce525c2e Add some tests to exercise date parsing
Date+SSKTest has a suite of tests that checks parsing of HTTP and
IOS8601 dates directly

NSURLSessionDataTask+OWS_HTTPTest validates that the Retry-After parsing
of NSHTTPURLResponse works as expected

Also, this change renames the NSURLSessionDataTask extension header to
something more generally appropriate
2020-08-13 14:40:22 -07:00
Michelle Linington
e3e903a8ad IOS-631: Suppress message processing pipeline while we have a pending backfill operation
Creates a new root singleton: OWSMessagePipelineSupervisor

As of right now, this singleton has two responsibilities:
- Track all message processing pipeline stages that have registered
  themselves
- Post processing suspension updates to interested stages

Four classes will now register themselves as pipeline stages:
- OWSMessageContentQueue
- YAPDBMessageDecryptQueue
- IncomingGroupsV2MessageQueue
- SSKMessageDecryptJobQueue

At initialization, OWSMessagePipelineSupervisor will take out a pipeline
suspension while it waits for a UUIDBackfillTask to complete. Other
interested objects are also able to suspend the message processing
pipeline by invoking suspendMessageProcessing(for:) on the supervisor
(though, currently this is not used by anything except tests)

This also adds some supporting improvements to UnfairLock. Now,
UnfairLock closures will return the value returned from its critical
section closure.
2020-07-22 21:10:27 -07:00
Nora Trapp
272c1a7cbc Simplify 2FA logic, update copy 2020-07-10 17:04:36 -07:00
Michelle Linington
5c7e82bbe3 Adopt changes from precommit linting scripts 2020-07-06 13:48:59 -07:00
Michelle Linington
5b0656060e IOS-641: Introduce various synchronization utilities
This commit adds two new synchronization utilities:

- Unfair locks: This adds an Objective-C wrapper around os_unfair_lock
  to help bridge it to Swift. (Swift's handling of the underlying C
  struct can lead to surprising TSan failures). This will be useful as a
  simple, performant lock in cases where fairness is not a concern.

- Shared serial queues: Private serial queues that are untargeted will
  target the global concurrent queues. Sometimes this is what we want,
  especially for potentially long-running work items. But for cases
  where work items are brief private serial queues risk spinning up a
  new thread.

  For private queues where the individual work items are brief and there
  isn't a more appropriate queue to target, the shared serial queues
  are a potential candidate.

This change also introduces tests for these new utilities and some QoS
management helper methods.
2020-07-06 13:48:59 -07:00
Matthew Chen
255cfe1cfd Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
c2cb189e16 Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Nora Trapp
2e6612525a Fix broken tests 2020-03-24 17:11:02 -07:00
Nora Trapp
5c976b0acd PR Feedback 2020-03-16 16:30:58 -07:00
Nora Trapp
72842e094d Disable some tests temporarily 2020-03-14 15:40:02 -07:00
Matthew Chen
529dbf09cd Fix unit tests. 2020-02-28 16:30:54 -03:00
Michael Kirk
f198d9037d Merge tag '3.5.0.5' 2020-02-19 19:26:05 -07:00
Nora Trapp
79d4b8e33a Storage Service Encryption Finalization 2020-02-11 13:29:02 -08:00
Matthew Chen
2734f01dcd Merge tag '3.3.0.5' 2020-01-27 12:00:09 -03:00
Matthew Chen
891c0cb039 Improve thread safety of job queues. 2020-01-24 17:00:50 -03:00
Nora Trapp
7c682e1858 Additional KBS vectors and normalization fix 2020-01-23 08:56:05 -08:00
Nora Trapp
d64d06d73b Fix test vectors for new Argon2 parameters 2020-01-22 10:06:58 -08:00
Nora Trapp
4f3993e5e2 finalize Argon2 parameters 2020-01-22 09:05:01 -08:00
Nora Trapp
51c7720b1b Allow user's to select an alphanumeric PIN 2020-01-20 18:33:48 -08:00
Nora Trapp
b7411bcb40 Implement final KBS master key encryption 2020-01-20 16:16:57 -08:00
Matthew Chen
72f912dce3 Versioned profile changes, etc. 2020-01-08 13:54:54 -03:00
Matthew Chen
29150102cb Revert group and profile changes. 2019-12-11 20:41:54 -08:00
Matthew Chen
0f8b2ccc74 Fix broken tests. 2019-12-05 12:37:22 -03:00
Matthew Chen
05c8e674ee Rework new group new creation & group updates. 2019-12-05 12:37:22 -03:00
Matthew Chen
e46eefe50e Remove readReturningResult(). 2019-11-14 10:39:33 -03:00
Matthew Chen
b38a64cce8 Revert "Revert "Merge branch 'charlesmchen/groupManager2'""
This reverts commit 7530dee591.
2019-11-12 09:02:52 -03:00
Matthew Chen
7530dee591 Revert "Merge branch 'charlesmchen/groupManager2'"
This reverts commit 26fd0d0812, reversing
changes made to c17865b750.
2019-11-11 20:01:45 -03:00
Matthew Chen
fa9e49136d Apply group manager in tests. 2019-11-11 17:31:21 -03:00
Matthew Chen
b5f777d985 Fix more broken tests. 2019-11-07 17:37:48 -03:00