Commit Graph

108 Commits

Author SHA1 Message Date
Michael Kirk
6dd55895b5 framework compatible tests
// FREEBIE
2017-08-18 18:01:05 -04:00
Michael Kirk
c995e00daf import cocoalumberjack in prefix
// FREEBIE
2017-08-18 18:01:05 -04:00
Michael Kirk
c1925e77fc Make framework friendly
- Adapt to Curve25159Kit renaming
- Explicit import
- move non-framework compatible includes out of header

// FREEBIE
2017-08-18 18:01:05 -04:00
Michael Kirk
6e9d5e8c3d Merge branch 'mkirk/more-logging' 2017-08-07 12:07:04 -04:00
Michael Kirk
4549ec4a18 align receiver chain check with libsignal-java
// FREEBIE
2017-08-07 11:15:36 -04:00
Michael Kirk
7179db4653 Add SPKAssert macros
include more logging
assert some invariants, which will log in production when not met.

Also removed an unsed PCH, moved the PCH out of Classes

// FREEBIE
2017-08-07 11:15:09 -04:00
Michael Kirk
ae6eda2b0c Fix "too far into the future" detection
// FREEBIE
2017-08-02 10:25:37 -04:00
Michael Kirk
28afe5c1db Merge branch 'mkirk/fix-tests' 2017-06-28 06:52:11 -10:00
Michael Kirk
729a8d47f6 Fix tests
// FREEBIE
2017-06-28 06:50:05 -10:00
Michael Kirk
3b7e71ddaf remove space from dir name
Allows for easier terminal use and fixes format script

// FREEBIE
2017-06-28 06:50:05 -10:00
Michael Kirk
81047679f6 Merge branch 'mkirk/archive-sessions-on-id-change' 2017-06-22 17:23:02 -04:00
Michael Kirk
8fa5ea8d22 session clearing must be in IdentityKeyStore implementation
Trying to do it in the protocol will not work with multiple devices,
because we'll only archive the session of the first sending device.

// FREEBIE
2017-06-22 17:05:17 -04:00
Michael Kirk
f8f44d143b Merge branch 'mkirk/archive-not-delete' 2017-06-08 10:43:38 -04:00
Michael Kirk
2c9d4a2deb Allow promoting of old session, regardless of if current session is
initialized.

Decryption doesn't care if the current session hasSenderChain.

We just care if we have *some* session which is valid for decrypting,
which is already covered in the "decryptWithSessionRecord" method.

We maintain the previous distinction to surface distinct error messages
for "No active session" vs. "Session out of sync"

// FREEBIE
2017-06-08 08:56:37 -04:00
Matthew Chen
9179d4e326 Merge branch 'charlesmchen/prekeyLogging' 2017-05-31 10:31:55 -04:00
Matthew Chen
f3268d0465 Improve logging around updating and using prekeys.
// FREEBIE
2017-05-31 10:31:46 -04:00
Michael Kirk
9bf4423f35 better logging on failed decrypt
// FREEBIE
2017-05-31 07:21:02 -07:00
Michael Kirk
a4cbfbcbef Check identity in encrypt/decrypt
// FREEBIE
2017-05-31 07:21:02 -07:00
Michael Kirk
d0bd4d56c0 code cleanup.
1. mark propertie as nonatomic/readonly
2. use ivar setters in init
3. rename session->sessionState to more closely follow
   libsignal-protocol-java reference implementation

// FREEBIE
2017-05-31 07:21:02 -07:00
Michael Kirk
aaeda00372 Merge branch 'mkirk/safety-numbers' 2017-05-24 18:04:58 -07:00
Michael Kirk
f289a7744e nullability annotations for IdentityKeyStore
// FREEBIE
2017-05-23 21:20:42 -07:00
Michael Kirk
23e2ad495b Ensure sessions are removed when replacing existing identity key
// FREEBIE
2017-05-23 19:33:26 -07:00
Michael Kirk
9b4810bd3a Differentiate incoming vs. outgoing trust
// FREEBIE
2017-05-20 19:55:00 -04:00
Matthew Chen
bce663486a Merge branch 'charlesmchen/license' 2017-04-13 16:59:25 -04:00
Matthew Chen
19c33e916b Update license.
// FREEBIE
2017-04-10 15:18:11 -04:00
Michael Kirk
139bde3773 Merge pull request #19 from WhisperSystems/mkirk/debug-asserts
Only assert dispatch_queue in DEBUG
2017-04-07 13:02:26 -04:00
Michael Kirk
1c9b907317 Only assert dispatch_queue in DEBUG
// FREEBIE
2017-04-07 12:45:55 -04:00
Michael Kirk
cbf2f47d59 Merge branch 'mkirk/mark-unfresh' 2017-03-31 12:36:07 -04:00
Michael Kirk
1fe2e238d3 Add method to explicitly mark session as unfresh
// FREEBIE
2017-03-30 16:24:59 -04:00
Michael Kirk
af1946846a Merge branch 'mkirk/promoting-sessions' 2017-03-30 13:30:17 -04:00
Michael Kirk
498b567d21 Become eventually consistent when remote has different session.
Promote a previous session to the active session if it successfully
decrypts a message.

// FREEBIE
2017-03-30 13:30:05 -04:00
Michael Kirk
f8272f3ea1 Merge pull request #18 from WhisperSystems/mkirk/add-logging
Add CocoaLumberjack
2017-03-30 11:01:59 -04:00
Michael Kirk
3b04acd9b3 Add CocoaLumberjack
Incidentally:
* Use podspec to determine dependencies
* Since AxolotlKit pod is a dev pod dependency of the AxolotlKit
  test-harness app, removed the redundant include of AxolotlKit files
  from the AxolotlKit test-harness app.

// FREEBIE
2017-03-29 18:42:59 -04:00
Michael Kirk
dcf226b659 Merge pull request #17 from WhisperSystems/mkirk/fix-warnings
Fixed warnings, update dependencies, Xcode
2017-03-29 11:47:51 -04:00
Michael Kirk
cf3671e35e Update to latest recommended xcodeproj (8.3) settings
// FREEBIE
2017-03-28 22:44:49 -04:00
Michael Kirk
34ef60c07f Ignore these unused variable warnings
Even though we're not currently using this variables, it makes sense to keep
the private/public key pairs if we want to do more future crypto tests that
would require them.

// FREEBIE
2017-03-28 22:34:18 -04:00
Michael Kirk
9fdcaa60f0 fix warnings: implement unimplemented protocol methods
// FREEBIE
2017-03-28 22:24:50 -04:00
Michael Kirk
8d92bc7144 correct capitalization of import
not a problem on case-insensitive file systems, but weird none-the-less.

// FREEBIE
2017-03-28 21:57:00 -04:00
Michael Kirk
19b5a67b2c Add remaining nullability annotations to fix nullability warnings
// FREEBIE
2017-03-28 21:56:35 -04:00
Michael Kirk
3323ddb12b Compatible with XCode 8.3
//FREEBIE
2017-03-28 21:46:09 -04:00
Michael Kirk
dc038ad497 update test app dependencies
// FREEBIE
2017-03-28 21:04:31 -04:00
Michael Kirk
23a5d1b67a Store session *after* saving new identity.
// FREEBIE
2017-03-20 11:26:10 -04:00
Michael Kirk
a3c843cc8a Merge branch 'release/2.7.1' 2017-02-15 18:30:40 -05:00
Matthew Chen
bb770b6a1c Clean up the prekeys.
// FREEBIE
2017-02-14 18:28:56 -05:00
Matthew Chen
945c04f9e7 Merge branch 'feature/prekey_' 2017-02-10 16:17:14 -05:00
Michael Kirk
9f55b0044e Clean up prekey logic.
// FREEBIE
2017-02-10 16:16:24 -05:00
Matthew Chen
968941c84f Merge branch 'charlesmchen/clangFormat' 2017-02-10 13:57:02 -05:00
Matthew Chen
c420c5b5ad Add .clang-format file.
// FREEBIE
2017-02-10 13:53:27 -05:00
Matthew Chen
ce297c233d Merge branch 'charlesmchen/prekeys' 2017-02-10 13:36:55 -05:00
Matthew Chen
8b723e58f0 Respond to CR.
// FREEBIE
2017-02-10 13:34:05 -05:00