Commit Graph

53 Commits (21325bc922908ce3284c4392305e2abbfeadf934)

Author SHA1 Message Date
Scott Nonnenberg bd0050b6c6 Cache messages on receipt, remove from cache when processed
FREEBIE
8 years ago
lilia 89a7875747 Remove unused function
This was supposed to solve the problem of losing group state after a reinstall
by inspecting member registration ids and pre-emptively sending group updates to
those who appear newly re-registered, but it has been unused since 6123c419.

Nowadays there's a protocol for requesting lost group state from other members.

// FREEBIE
8 years ago
haffenloher 04f0142b23 Ignore missing members in incoming group updates
Previously, updateNumbers would throw an Error, so the whole group
update was discarded.

Signal-Android handles this the same way in
GroupMessageProcessor.handleGroupUpdate().

Closes #1056
8 years ago
lilia 02ca0a09ac Remove dead code 9 years ago
lilia f8e176fd40 Dedupe methods
Define textsecure.crypto in terms of libsignal.crypto.

// FREEBIE
9 years ago
lilia 58452066aa Move device storage methods to outgoing message
This is the only place they are called.

// FREEBIE
9 years ago
lilia daae664965 Remove unused function
// FREEBIE
9 years ago
lilia 7939b6ae98 Remove hasOpenSession from protocol_wrapper
// FREEBIE
9 years ago
lilia 843036f0ce Remove getRegistrationId and encryptMessageFor from protocol_wrapper
We can now use protocol classes like SessionCipher directly because it
supports per-device read/write serialization internally.

// FREEBIE
9 years ago
lilia 56238136ca Remove trivial wrapper method
// FREEBIE
9 years ago
lilia 78cdc0cb52 Remove tempKeys
Now that we simply establish and save a session via SessionBuilder
rather than saving the keys to pass in during encrypt, we can stop
caching them in memory in between the identity key check and the
encryption step.

// FREEBIE
9 years ago
lilia 9f871db48a Update libsignal-protocol / Update prekey format
Integrates change in prekey object formatting, which now matches more
conveniently with the representation rendered by the server.

// FREEBIE
9 years ago
lilia 1d60dc38fb Rename axolotl storage
// FREEBIE
9 years ago
lilia 1fe5d63015 Update protocol libs
Rename storage functions

// FREEBIE
9 years ago
lilia adf8445b85 Populate registrationIds on deviceObjects
Saves us from doing so later.

// FREEBIE
10 years ago
lilia a52d35bb1b Refactor and fixup key requests
Fix a bad loop scope bug in getKeysForNumber by using forEach.
Refactor the initial process of establishing key material for devices
that do not have open sessions.

// FREEBIE
10 years ago
lilia b18cfd75de Check for device keys in memory before requesting more
// FREEBIE
10 years ago
lilia 9872b59355 Simplify filter predicate
Untangle a double negative to make this line shorter and easier to read.

// FREEBIE
10 years ago
lilia 0fa1069a93 Don't throw on duplicate members in a group update
Fixes #364

// FREEBIE
10 years ago
lilia ce49d14d85 Fix leave group bug
This one's been around since forever, but only manifests when someone
leaves the group and comes back. In that case we fail to reinit their
numberRegistrationId object, which causes a npe when we try to send
send them group messages.

Affected parties must ask their fickle friends to leave/join again.

// FREEBIE
10 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
10 years ago
lilia 27016e1919 Let textsecure devices throw on identity key change
Restore error format, accidentally removed in 43d6efcd

// FREEBIE
10 years ago
lilia db31835f68 Handle group sync for existing groups
// FREEBIE
10 years ago
lilia f32ff58953 Add support for device name 10 years ago
lilia 061d57c95a Fix string vs number comparison
Fix bug in device storage causing duplicate device messages after a 410.
10 years ago
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.
10 years ago
lilia f774047935 Make libtextsecure group storage asynchronous 10 years ago
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.
10 years ago
lilia 121671c99f Store identity keys in indexeddb
Let device storage request them from axolotl store rather than storing a
copy.
10 years ago
lilia 20ebc3f890 Move identity key storage functions to axolotl store 10 years ago
lilia f38b18ef63 Move Session storage to axolotlstore 10 years ago
lilia 9de1572ba6 Convert all storage.devices methods to be asynchronous 10 years ago
lilia 71715c95bc Async remove identity 10 years ago
lilia 26f1aa4db5 Async putSessionsForDevice 10 years ago
lilia 666f6baaca Async getSessionsForNumber 10 years ago
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
10 years ago
lilia 37e09da1cc Remove unsued argument from getDeviceObject
Last usage of the `returnIdentityKey` argument was removed in 8b9a16852.
10 years ago
Matt Corallo 8b9a168524 Store session information separately 10 years ago
Matt Corallo e33c6fddda Do not rely on deviceObject.sessions anywhere in sendmessage 10 years ago
Matt Corallo 6c0f3ff1f0 Move session-storage logic to storage/devices from axolotl_wrapper 10 years ago
Matt Corallo 00cb420d37 Merge (un)encrypted storage layers 10 years ago
Matt Corallo 454b4726bd Replace load/decode/index around our own number with helpers 10 years ago
Matt Corallo e2e06b2d3c Remove axolotl.storage usage from libtextsecure 10 years ago
lilia 676ad04958 Add device storage method to wipe an identity 10 years ago
Matt Corallo b356403061 De-duplicate registrationId in deviceObject 10 years ago
Matt Corallo 92d0de6837 [de]serialize sessions storage in device storage 10 years ago
Matt Corallo 1bef1ce5d3 Split out identity key storage from session storage 10 years ago
Matt Corallo 7e3f1ef452 Actually store on removeDeviceIds 10 years ago
Matt Corallo 1806210b26 Rewrite most of the device storage stuff 10 years ago
Matt Corallo bfb3e7751e Add missing validity check to device storage 10 years ago