Commit Graph

85 Commits

Author SHA1 Message Date
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
Michael Kirk
329fffb8e2 Fixing up phonenumber parsing tests 2019-10-25 18:33:56 -07:00
Michael Kirk
6fea78a6b3 Linking flow 2019-10-17 10:19:32 -06:00
Matthew Chen
63c2cbf71b Fix broken tests. 2019-10-04 19:34:08 -03:00
Matthew Chen
d813419afa Fix TSMessageStorageTests. 2019-10-01 13:37:04 -03:00
Matthew Chen
20683678b5 Store group avatars as data. 2019-09-27 16:25:53 -03:00
Matthew Chen
eccfad0f46 Merge remote-tracking branch 'private/release/2.41.0' 2019-08-06 12:12:39 -03:00
Matthew Chen
4f03f969fc Rework "view once" messages. 2019-08-01 16:13:37 -03:00
Matthew Chen
1e363d2c65 Make uniqueId non-nil. 2019-07-31 10:50:59 -03:00
Matthew Chen
e77e03afb2 Remove usage of primary storage. 2019-07-29 15:30:10 -03:00
Michael Kirk
17d960a26e Swift errors vs. isRetryable 2019-07-25 10:56:30 -06:00
Matthew Chen
4a7e3532e7 Remove YDB connections. 2019-07-25 10:25:45 -03:00