Commit graph

152 commits

Author SHA1 Message Date
Michael Kirk
1d3831eccd Registration Lock reminder view
Also fixed: Don't lose PIN across registrations

// FREEBIE
2018-03-05 09:53:09 -05:00
Michael Kirk
54792ff461 Fix overzealous assert.
Sometimes we set values to nil - e.g. when re-registering through
debugUI

// FREEBIE
2018-03-05 09:37:26 -05:00
Matthew Chen
59c745756a Clean up codebase. 2018-03-02 15:05:14 -05:00
Matthew Chen
e12a1e984a Work on two-factor auth settings UI. 2018-03-01 15:38:59 -05:00
Matthew Chen
59f480d5c4 Use background tasks during storage registration and disappearing message jobs. 2018-02-27 08:42:30 -05:00
Matthew Chen
4e1e232825 Flush writes from other processes. 2018-02-22 11:46:08 -05:00
Matthew Chen
3bb802189c Use background tasks during db transactions. 2018-02-21 16:10:55 -05:00
Matthew Chen
706006539f Improve the robustness of the migration logic. 2018-02-20 20:16:12 -05:00
Matthew Chen
d91507d897 Improve the robustness of the migration logic. 2018-02-20 17:37:14 -05:00
Matthew Chen
9295a56309 Elaborate logging around storage migration. 2018-02-20 16:25:15 -05:00
Michael Kirk
033505afd7 Remove slow file protection updates from launch path
To avoid blocking launch, file protection is now updated async for most
moved files. Out of paranoia, the database files are also update
redundantly on a sync code path.

It's still critical that we update permissions recursively for two
reasons:

1. Updating a containing directories FileProtection does not affect
   existing files in that directory.

2. Because we've changed the containers default file protection level
   (from unspecified to NSFileProtectionComplete), some existing files
   will have there file protection updated upon launching Signal 2.20.
   It's not clear to me which files this affects, and I haven't found
   any relevant documentation, but from observation, it seems to affect
   any top-level files in the container. Regardless, we're now doing the
   right thing: after launching 2.20, ensure all file permissions are
   what we expect.

Also removed no-op file protection on legacy db files. They've already
been moved by the time this method runs in AppSetup.

// FREEBIE
2018-02-18 16:24:29 -05:00
Michael Kirk
3d5f7e6bf3 Clean up logging
- tag all log lines for easier filtering
- use up-to-date database path

// FREEBIE
2018-02-14 09:16:42 -08:00
Matthew Chen
ba42ac73d8 Revisit TODOs in the SAE work. 2018-02-12 22:33:26 -05:00
Matthew Chen
b64528e817 Respond to CR. 2018-02-09 10:42:25 -05:00
Matthew Chen
bd0f601792 Respond to CR. 2018-02-09 10:31:29 -05:00
Matthew Chen
38950ae2ed Respond to CR. 2018-02-09 10:31:29 -05:00
Matthew Chen
6b357f9445 Respond to CR. 2018-02-09 10:31:29 -05:00
Matthew Chen
43765ef3b5 Respond to CR. 2018-02-09 10:31:29 -05:00
Matthew Chen
7d3f79440f Clean up ahead of PR. 2018-02-09 10:31:29 -05:00
Matthew Chen
bbd689bfd0 Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Matthew Chen
074046b98e Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Matthew Chen
7358f3053f Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Matthew Chen
39e353503f Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Matthew Chen
71782e0369 Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Matthew Chen
122ef91e57 Add protocol context to protocol kit. 2018-02-09 10:31:29 -05:00
Michael Kirk
4f8db63fb3 Ensure keyspec is generated before DB is created
// FREEBIE
2018-01-31 18:05:44 -08:00
Michael Kirk
6f959ff292 CR: be more conservative about deriving key spec, clear old passphrase
after deriving key spec.

// FREEBIE
2018-01-31 17:22:42 -08:00
Michael Kirk
d22fc664f2 more granular key access
// FREEBIE
2018-01-31 16:08:03 -08:00
Michael Kirk
426c9baa16 Key material changes
- For new installs, generate raw key-spec rather than derive it
- Adapt to separated concerns of the key derivation migration from the unencrypted header migration
- Reduce number of places where we delete/generate keying information
- Only store relevant keying material

// FREEBIE
2018-01-31 16:08:03 -08:00
Michael Kirk
938b9c85b8 Don't crash on clean install
Otherwise we'll error when retrieving non-existent password.

// FREEBIE
2018-01-31 13:28:14 -08:00
Matthew Chen
4bfdef520a Respond to CR. 2018-01-30 12:39:27 -05:00
Matthew Chen
963d0547ad Clean up ahead of PR. 2018-01-30 10:31:13 -05:00
Matthew Chen
ebbe96a5d5 Clean up ahead of PR. 2018-01-30 10:31:13 -05:00
Matthew Chen
6eddfae214 Improve post-migration testing tools. 2018-01-30 10:31:13 -05:00
matthew chen
8325c37191 Fix build breakage. 2018-01-30 10:30:28 -05:00
matthew chen
873c789132 Fix build breakage. 2018-01-30 10:30:28 -05:00
Matthew Chen
b9ec7d96e9 Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
aeeef43416 Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
eb180ba5c4 Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
100adae245 Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
5cf89a0f3d Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
6f7f1b3b08 Improve pre-migration testing tools. 2018-01-30 10:06:46 -05:00
Matthew Chen
6a81d8e5c2 Respond to CR. 2018-01-25 13:16:35 -05:00
Matthew Chen
0cc7f3e00e Clean up ahead of PR. 2018-01-25 11:00:38 -05:00
Matthew Chen
5d422e03d1 Add support for key specs. 2018-01-25 11:00:38 -05:00
Matthew Chen
c5079ed3d7 Add support for key specs. 2018-01-25 11:00:38 -05:00
Matthew Chen
a3e77019e2 Update storage to use database salts. 2018-01-25 11:00:38 -05:00
Matthew Chen
173da64bc4 Modify YapDatabase to read converted database, part 1. 2018-01-25 11:00:38 -05:00
Michael Kirk
71dc7f55d3 Copy DB setup / keying from Yap into conversion
// FREEBIE
2018-01-25 11:00:38 -05:00
Matthew Chen
1bff0f2b0e Incomplete commit starting work on loading databases for conversion. 2018-01-25 11:00:38 -05:00