Commit graph

1044 commits

Author SHA1 Message Date
lilia
65c069b3d3 Update extension name and description 2015-05-07 14:46:03 -07:00
lilia
915612114b Remove general get/put/remove methods from AxolotlStore 2015-05-06 18:14:32 -07:00
lilia
d0e262d7cb AxolotlStore stores groups in indexeddb 2015-05-06 17:49:31 -07:00
lilia
359b4a15a2 Move group storage to axolotl store
Add async get/put/removeGroup to axolotl store and let libtextsecure
use it for group state storage.
2015-05-06 17:49:23 -07:00
lilia
748f32022a Fix up refreshGroup 2015-05-06 13:49:20 -07:00
lilia
f774047935 Make libtextsecure group storage asynchronous 2015-05-06 13:11:12 -07:00
lilia
c26c6fc317 Store sessions by encodedNumber
Storing multiple sessions in a single indexeddb record is prone to
clobbering data due to races between requests to update multiple device
sessions for the same number, since you have to read the current state
of the device->session map and update it. Splitting the records up makes
it so that those updates can be made in parallel. Selecting all the
sessions for a given number can still be done efficiently thanks to
indexeddb range queries.
2015-05-05 17:44:59 -07:00
lilia
37c496f4f0 Close the provisioning socket 2015-05-05 17:44:59 -07:00
lilia
43d6efcd9e Don't save device objects to disk
Generate them from session and identity data. Save/delete pending prekey
data in an in-memory store and attach it to outgoing device objects.
2015-05-05 17:44:59 -07:00
lilia
f18795a253 Add removeSession 2015-05-05 17:44:58 -07:00
lilia
f413f03a6b Add getDeviceIds to axolotlstore
And add tests for getDeviceIds and removeAllSessions
2015-05-05 17:44:58 -07:00
lilia
121671c99f Store identity keys in indexeddb
Let device storage request them from axolotl store rather than storing a
copy.
2015-05-05 17:44:58 -07:00
lilia
7eda48f755 Move Session Storage to indexedDB 2015-05-05 17:44:58 -07:00
lilia
20ebc3f890 Move identity key storage functions to axolotl store 2015-05-05 17:44:58 -07:00
lilia
f38b18ef63 Move Session storage to axolotlstore 2015-05-05 17:44:57 -07:00
lilia
9de1572ba6 Convert all storage.devices methods to be asynchronous 2015-05-05 17:44:57 -07:00
lilia
71715c95bc Async remove identity 2015-05-05 17:44:57 -07:00
lilia
26f1aa4db5 Async putSessionsForDevice 2015-05-05 17:44:57 -07:00
lilia
666f6baaca Async getSessionsForNumber 2015-05-05 17:44:56 -07:00
lilia
9e7d8c0a08 Rename textsecure.api and make it internal-only 2015-05-05 17:44:56 -07:00
lilia
45a61780af Fixup refreshPreKeys and call it whenever a prekey is deleted 2015-05-05 17:44:56 -07:00
lilia
7d0aeac8cb Use a worker to facilitate key generation 2015-05-05 17:44:55 -07:00
lilia
f465bdddbf Add textsecure.AccountManager
This class should be used for account registration and for refreshing
prekeys for your account.
2015-05-05 17:44:55 -07:00
lilia
a960acacc6 Add textsecure.refreshKeys
This helper checks the server for the number of remaining prekeys, then
generates more if there are fewer than 10 remaining.

// FREEBIE
2015-05-05 17:44:55 -07:00
lilia
96eafc7750 Integrate libaxolotl async storage changes
* Session records are now opaque strings, so treat them that way:
  - no more cross checking identity key and session records
  - Move hasOpenSession to axolotl wrapper
  - Remote registration ids must be fetched async'ly via protocol wrapper
* Implement async AxolotlStore using textsecure.storage
* Add some db stores and move prekeys and signed keys to indexeddb
* Add storage tests
* Rename identityKey storage key from libaxolotl25519KeyidentityKey to
  simply identityKey, since it's no longer hardcoded in libaxolotl
* Rework registration and key-generation, keeping logic in libtextsecure
  and rendering in options.js.
* Remove key_worker since workers are handled at the libaxolotl level
  now
2015-05-05 17:44:55 -07:00
lilia
8304aa903a Update libaxololt to a087b9e746e67995f16e077183cc0 2015-05-05 17:44:54 -07:00
lilia
2cb0070343 s/TextSecure/Signal on options page 2015-05-05 17:44:30 -07:00
lilia
a76fbe165b Add css transition to smooth progress bar animation
Conflicts:
	js/options.js
2015-05-05 13:55:52 -07:00
lilia
2ff954d2f8 Fix api.js 2015-05-04 15:14:58 -07:00
lilia
e4b49bde51 Add more websocket tests 2015-05-01 13:25:46 -07:00
lilia
cc6a44f35d Fix tests 2015-05-01 12:13:03 -07:00
lilia
3ea254d0db Add TextSecureWebSocket tests 2015-04-30 16:59:16 -07:00
lilia
849a407433 Add mock-socket for testing socket stuff 2015-04-30 15:43:11 -07:00
lilia
da34b8e0f8 Rename textsecure.websocket and make it internal-only 2015-04-30 15:07:35 -07:00
lilia
89c24cd2fa Move throwHumanError to api.js
It is only used there.
2015-04-30 12:26:13 -07:00
lilia
36b1e87214 Add textsecure.MessageReceiver
Encapsulate the websocket resources and socket setup process in a
friendly OO class. The MessageReceiver constructor expects an instance
of EventTarget on which to fire message events asynchronously. The
provider of the EventTarget can then add/remove listeners as desired.
2015-04-29 16:50:20 -07:00
lilia
bf2bf4cfd9 Remove redirect to index from registration.done() 2015-04-29 13:39:41 -07:00
lilia
6f3de68834 Move browserAction call 2015-04-29 12:22:12 -07:00
Tara Vancil
074bb66a4c Add tests for messages model.
Closes #222
2015-04-22 13:45:32 -07:00
Matt Corallo
4157c2c7a4 Merge pull request #227 from WhisperSystems/devices
Remove unsued argument from getDeviceObject
2015-04-21 13:14:35 -07:00
lilia
37e09da1cc Remove unsued argument from getDeviceObject
Last usage of the `returnIdentityKey` argument was removed in 8b9a16852.
2015-04-20 17:20:58 -07:00
lilia
5a46300581 Reorder database.js include in test 2015-04-15 18:11:06 -07:00
lilia
5888039123 Reorder database.js include
Prep to use indexedDB for axolotl storage.
2015-04-15 18:06:33 -07:00
lilia
026f110d36 Delete the database once, before tests run 2015-04-15 18:02:44 -07:00
lilia
c68bf07409 Don't jscs the generated key_worker.js 2015-04-15 17:06:06 -07:00
lilia
bdecf5cc44 Generate key_worker.js
Instead of calling importScripts, which is prone to relative path
issues, generate the worker script with everything it needs included.
2015-04-15 15:38:57 -07:00
lilia
7af42a27c5 Fix registerKeys using array indices for key ids
preKeys is an array whose indices may or may not be keyId-based. Since
we have an inline keyId property, use that instead.
2015-04-15 15:23:08 -07:00
lilia
00989962d8 Rename worker script file 2015-04-15 14:42:01 -07:00
lilia
de65f9e6bd Add missing resolve 2015-04-15 12:24:29 -07:00
Patrick Connolly
b5d724ffc3 Replaced frontend getString calls broken in d3c158f.
Closes #224
2015-04-15 11:56:36 -07:00