Commit Graph

48 Commits

Author SHA1 Message Date
Matthew Chen
36485c9461 Remove RedPhone code.
// FREEBIE
2017-03-29 12:23:05 -04:00
Matthew Chen
a1e5019370 Respond to CR.
// FREEBIE
2017-03-22 09:38:33 -04:00
Matthew Chen
e92d40a127 Fix edge cases around the websocket lifecycle.
// FREEBIE
2017-03-22 09:37:53 -04:00
Matthew Chen
0f47dc6200 Fix edge cases around the websocket lifecycle.
// FREEBIE
2017-03-22 09:37:53 -04:00
Michael Kirk
db15ff5e87 Save message before sending starts.
Otherwise the message doesn't get saved until it's in the queue.
Interestingly, this could also address some of the perceived lag
mentioned in: https://github.com/WhisperSystems/Signal-iOS/pull/1850

// FREEBIE
2017-03-20 14:53:42 -04:00
Matthew Chen
88f343a0aa Attempt to fix the "frequent attachment download errors with low server ids".
// FREEBIE
2017-03-15 12:17:54 -03:00
Matthew Chen
865d9d7b96 Add "is uploaded" property to attachment streams.
// FREEBIE
2017-03-15 10:17:41 -03:00
Matthew Chen
e4636e8336 Respond to CR.
// FREEBIE
2017-03-14 14:09:57 -03:00
Matthew Chen
f40629ffa0 Improve alignment between socket state and socket manager state.
// FREEBIE
2017-03-14 13:34:20 -03:00
Michael Kirk
452110b687 Include digest in attachments
- constant time compare
- free buffer passed to NSData

// FREEBIE
2017-03-13 12:32:35 -04:00
Matthew Chen
254a247ba0 Revert "Add WebRTC setting."
This reverts commit 0f45f292a1.

// FREEBIE
2017-02-22 09:51:45 -05:00
Matthew Chen
df4b0616e8 Improve rate-limiting error message in registration and code verification views.
// FREEBIE
2017-02-11 16:25:07 -05:00
Michael Kirk
e0688e16a7 Clean up prekey logic.
// FREEBIE
2017-02-10 16:12:28 -05:00
Matthew Chen
284212b3fe Move OWSDispatch.h to the PCH.
// FREEBIE
2017-02-08 16:25:28 -05:00
Michael Kirk
92a69e8e65 Repsond to CR w/ @cmchen.
* Added docs
* added asserts to TSEnv accessors

// FREEBIE
2017-02-02 15:15:38 -05:00
Michael Kirk
cf6f107f1e Merge remote-tracking branch 'origin/master' into mkirk/webrtc
Get session corruption fixes

// FREEBIE
2017-01-25 11:33:07 -05:00
Michael Kirk
f4a46fce08 Merge remote-tracking branch 'origin/master' into mkirk/webrtc 2017-01-24 17:38:29 -05:00
Michael Kirk
5d863418ea Narrow the scope of code run on SessionCipher queue
And run all non-cipher code on the main thread.

Note: Running encryption on the sessionCipher queue is more about
serializing access to session mutations than it is about any performance
gains.

// FREEBIE
2017-01-24 15:52:58 -05:00
Michael Kirk
3216fd3714 Prevent session corruption by using same queue for encrypt vs. decrypt
// FREEBIE
2017-01-24 15:00:38 -05:00
Michael Kirk
8f81015730 Remove Cuba from domain fronting.
Google hosted domain fronting doesn't work in Cuba due to export
restrictions. OTOH there are reports of Signal working just fine without
domain fronting in Cuba.

// FREEBIE
2017-01-20 18:11:34 -05:00
Matthew Chen
305541d03b Merge branch 'feature/fixWebsocket2' into mkirk/webrtc 2017-01-17 18:43:43 -05:00
Matthew Chen
79095ecfb8 Fix web socket issue.
// FREEBIE
2017-01-17 17:43:34 -05:00
Matthew Chen
0f45f292a1 Add WebRTC setting.
// FREEBIE
2017-01-12 09:07:35 -05:00
Michael Kirk
d1aa253f87 WebRTC calling
* Stun server request
* settable TextSecureEnv
* nullability annotations for TSCall
* Better debug logging for message sending
* fixup tests and expiration time

// FREEBIE
2017-01-11 17:15:20 -05:00
Matthew Chen
6192351725 Remove Iran from censorship circumvention. Current approach isn't sufficient.
// FREEBIE
2017-01-10 16:32:34 -05:00
Matthew Chen
19e4b2c3a2 Revert "Remove Iran from censorship circumvention. Current approach isn't sufficient."
This reverts commit 374b45146d.
2017-01-06 13:10:18 -05:00
Matthew Chen
374b45146d Remove Iran from censorship circumvention. Current approach isn't sufficient.
// FREEBIE
2017-01-06 13:08:00 -05:00
Matthew Chen
f470979434 Add asserts to .pch.
// FREEBIE
2017-01-04 15:15:29 -05:00
Matthew Chen
5b87af9bc6 Respond to CR, fix build break.
// FREEBIE
2017-01-04 14:16:12 -05:00
Matthew Chen
c3af5bc742 Fix the UAE Google domain.
// FREEBIE
2017-01-04 14:16:06 -05:00
Matthew Chen
cc78978be5 Update fronting to use country-specific Google domains.
// FREEBIE
2017-01-04 14:16:02 -05:00
Matthew Chen
2438bd16c5 Add Iran, Oman, Cuba to censorship list.
// FREEBIE
2017-01-04 14:15:14 -05:00
Matthew Chen
52762a1be9 Clean up.
// FREEBIE
2017-01-04 15:22:15 +01:00
Michael Kirk
78515377b1 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching
* alternate pinning policy for google hosted reflector server

// FREEBIE
2016-12-21 09:56:48 -06:00
Michael Kirk
b1ebfa9873 Revert "WIP: Censorship circumvention in Egypt and UAE"
This reverts commit f1ade83c3f.

No quite ready yet.
2016-12-20 17:24:50 -06:00
Michael Kirk
f1ade83c3f WIP: Censorship circumvention in Egypt and UAE
* non-websocket message fetching

// FREEBIE
2016-12-20 17:23:44 -06:00
Michael Kirk
b6676fb029 Better error messages when failure to send due to:
- no internet
- unregistered recipient

// FREEBIE
2016-10-25 09:55:46 -04:00
Michael Kirk
4ba1e86ec1 Explain send failures for text and media messages
Motivation
----------
We were often swallowing errors or yielding generic errors when it would
be better to provide specific errors.

We also didn't create an attachment when attachments failed to send,
making it impossible to show the user what was happening with an
in-progress or failed attachment.

Primary Changes
---------------
- Funnel all message sending through MessageSender, and remove message sending
  from MessagesManager.
  - Record most recent sending error so we can expose it in the UI
  - Can resend attachments.
  - Update message status for attachments, just like text messages
- Extracted UploadingService from MessagesManager
  - Saving attachment stream before uploading gives uniform API for send vs.
    resend
  - update status for downloading transcript attachments
- TSAttachments have a local id, separate from the server allocated id
  This allows us to save the attachment before the allocation request. Which is
  is good because:
  1. can show feedback to user faster.
  2. allows us to show an error when allocation fails.

Code Cleanup
------------
- Replaced a lot of global singleton access with injected dependencies to make
  for easier testing.
- Never save group meta messages. Rather than checking before (hopefully) every
  save, do it in the save method.
- Don't use callbacks for sync code.
- Handle errors on writing attachment data
- Fix old long broken tests that weren't even running. =(
- Removed dead code
- Use constants vs define
- Port flaky travis fixes from Signal-iOS

// FREEBIE
2016-10-24 09:36:51 -04:00
Michael Kirk
c5edc9997a Production log level to INFO (#34)
// FREEBIE
2016-09-27 20:15:02 -04:00
Michael Kirk
65e6778033 log network manager requests
// FREEBIE
2016-09-13 12:26:12 -04:00
Michael Kirk
a99fde4d3b Device manager
// FREEBIE
2016-09-09 15:11:40 -04:00
Michael Kirk
9093be2b0d Device provisioning
// FREEBIE
2016-09-02 12:28:58 -04:00
Michael Kirk
4d52d28e06 Use non-deprecated method for sending data.
No copying required in our case since we've just built the data for only
this purpose.

// FREEBIE
2016-09-02 12:28:57 -04:00
Michael Kirk
1d0b645fc9 Update to new protocol (#23)
* new protobufs from libsignal-service-java@a1c93edc40e3ce201fa4e70339a3e6f4e197e319
* Makefile to build ObjC classes from *.proto
* refactored some touched code to minimize duplication
* removed unused protos
* deleted some dead code
* renamed method for clarity

// FREEBIE
2016-08-22 16:09:58 -04:00
Michael Kirk
664162fe24 Use SocketRocket pluggable policies (#15)
* Use SocketRocket pluggable policies

Pluggable policies are currently only in our fork, but pending upstream
PR: https://github.com/facebook/SocketRocket/pull/429

Also:
* rebased SocketRocket against latest upstream to incorporate bug fixes.
* adapt to new upstream API for error handling (vs previous exception throwing)
* renamed AFSecurityOWSPolicy -> OWSHTTPSecurityPolicy to differentiate
  it from OSWWebSocketSecurityPolicy
* Follow conventional singleton pattern with onceToken
* bump xcode version to play nice with SWIFT_NAME in SocketRocket

// FREEBIE
2016-06-30 20:39:01 -07:00
Michael Kirk
9ab38efe9e There is no longer a distinction between redphone/text secure users. (#12)
We only support voice+text clients 

* remove voice parameter since we always support voice
* test TSAttributes

Plus re-styled touched code:
* don't access ivars outside of init/dealloc
* remove unused code


// FREEBIE
2016-06-27 19:48:37 -07:00
Michael Kirk
8058951b08 Adapt to updated SocketRocket pod refactorings. (#11)
While trying to pull in upstream changes to our fork of SocketRocket I
noticed we're publishing it/installing it from CocoaPods trunk, but
there's no need to do that.

Also, due to upstream refactoring, the actual included file has
changed.

// FREEBIE
2016-06-14 12:19:19 -07:00
Frederic Jacobs
5d91a5bd4f Init Commit 2015-12-22 15:51:11 +01:00