Commit Graph

2734 Commits

Author SHA1 Message Date
Andreas Straub
6867b5c3ab Return empty set on invalid PEP devicelist 2015-07-19 21:32:27 +02:00
Andreas Straub
25450bf6d3 Trust all IdentityKeys
The trust-on-first-use policy leads to problems when receiving messages
from two different devices of a contact before sending a message to them
(as their IdentityKeys will not have been added yet). Since session
trust will be managed externally anyway, this change is not a security
problem, and will allow us to decrypt messages from yet-untrusted
sessions.
2015-07-19 21:32:27 +02:00
Andreas Straub
bf4185ac08 Refresh PEP on session establish
We now track preKeys used to establish incoming sessions with us. On
each new established session, we remove the used prekey from PEP. We
have to do this because libaxolotl-java internally clears the used
preKey from its storage, so we will not be able to establish any future
sessions using that key.
2015-07-19 21:32:27 +02:00
Andreas Straub
69600502d2 Fix asynchronous axolotl message sending
XmppConnectionService.sendMessage() now dispatches messages to the
AxolotlService, where they only are prepared for sending and cached.
AxolotlService now triggers a XmppConnectionService.resendMessage(),
which then handles sending the cached message packet.

This transparently fixes, e.g., handling of messages sent while we are
offline.
2015-07-19 21:32:27 +02:00
Andreas Straub
ec6870307e Properly track message sender
Previously, the sender was assumed to be the conversation counterpart.
This broke carboned own-device messages. We now track the sender
properly, and also set the status (sent by one of the own devices vs
received from the counterpart) accordingly.
2015-07-19 21:32:27 +02:00
Andreas Straub
18c1e15d00 Rework PEP content verification
Now checks which part(s) are out of sync w/ local storage, and updates
only those, rather than assuming the entire node corrupt and
overwriting it all (especially relevant for preKey list)
2015-07-19 21:32:27 +02:00
Andreas Straub
9a0232f7e7 Formatting fixes 2015-07-19 21:32:27 +02:00
Andreas Straub
992cf5652e When receiving, add mock session if none exists
We need a session object in order to build a session from a
PreKeyWhisperMessage, so add an empty one when none exists on receiving
a message.

Warning: this will break right now if the session can not be constructed
from the received message.There will be an invalid session which will
break if we try to send using it.
2015-07-19 21:32:26 +02:00
Andreas Straub
1b0596d574 Tag messages with originating session
This can be used later in order to display trust status of messages, as
well as for potential resending of messages in case of preKey conflicts.
2015-07-19 21:32:26 +02:00
Andreas Straub
3815d4efa3 Fetch bundles on-demand, encrypt in background
Bundles are now fetched on demand when a session needs to be
established. This should lessen the chance of changes to the bundles
occuring before they're used, as well as lessen the load of fetching
bundles.

Also, the message encryption is now done in a background thread, as this
can be somewhat costly if many sessions are present. This is probably
not going to be an issue in real use, but it's good practice anyway.
2015-07-19 21:32:26 +02:00
Andreas Straub
cb7980c65e Use bareJid for own session retrieval 2015-07-19 21:32:26 +02:00
Andreas Straub
c1d23b2395 Migrate to new PEP layout
Merge prekeys into bundle node
2015-07-19 21:32:26 +02:00
Andreas Straub
6492801b89 Formatting fixes 2015-07-19 21:32:26 +02:00
Andreas Straub
74026b742b Save IdentityKeys in database 2015-07-19 21:32:26 +02:00
Andreas Straub
9e07fc5651 DatabaseBackend bugfixes
Don't leak cursors, initially create tables
2015-07-19 21:32:26 +02:00
Andreas Straub
299bbdf27f Reformat code to use tabs
This really sucks to do it like this. Sorry. :(
2015-07-19 21:32:26 +02:00
Andreas Straub
065519d3f3 Added axolotl activation code to UI 2015-07-19 21:32:26 +02:00
Andreas Straub
77619b55e4 Added PEP and message protocol layers
Can now fetch/retrieve from PEP, as well as encode/decode messages
2015-07-19 21:32:26 +02:00
Andreas Straub
f73aa1a200 Reworked axolotl protocol layer
Numerous fixes
2015-07-19 21:32:25 +02:00
Andreas Straub
077932eb55 CryptoNext Menu entries added 2015-07-19 21:32:25 +02:00
Andreas Straub
b8048a5538 CryptoNext persistance layer mockup
Initial sketch of the peripheral storage infrastructure for the new
axolotl-based encryption scheme.
2015-07-19 21:32:21 +02:00
Daniel Gultsch
c4f3e5be3f shut up linter 2015-07-19 14:51:11 +02:00
Daniel Gultsch
9b70c7e68c bugfix: don't crash if aes key could not be set before jingle transfer 2015-07-19 14:51:04 +02:00
Daniel Gultsch
5c017e5186 bugfix: use sendIqPacket method in service instead of invoking XmppConnection directly 2015-07-19 14:25:30 +02:00
Daniel Gultsch
0166ced46c bugfix: accept status code 201 on http upload 2015-07-19 13:36:02 +02:00
Daniel Gultsch
f58b2afcaa changed switch widget 2015-07-18 19:38:52 +02:00
Daniel Gultsch
731e1dcd43 Merge branch 'development' 2015-07-18 00:17:17 +02:00
Daniel Gultsch
451345f8ed bump version to 1.5.0 2015-07-18 00:16:32 +02:00
Daniel Gultsch
15b880f3a1 pulled translations 2015-07-18 00:02:13 +02:00
Daniel Gultsch
ce527c8b76 account for downloaded http files in dup checker 2015-07-18 00:01:34 +02:00
Daniel Gultsch
aa1b9de20c code cleanup 2015-07-17 23:58:53 +02:00
Daniel Gultsch
c3584a6db7 fixed inactive http download 2015-07-17 23:58:33 +02:00
Daniel Gultsch
13cce172ab show error message in account details when info has not been edited 2015-07-17 13:14:24 +02:00
Daniel Gultsch
1f43115544 increased ibb block size 2015-07-17 13:06:51 +02:00
Daniel Gultsch
4f62793a67 version bump to 1.5.0-beta.2 2015-07-16 14:27:36 +02:00
Daniel Gultsch
425f0479a8 even less jumpy 2015-07-16 14:06:54 +02:00
Daniel Gultsch
6a329c7465 fixed some ux glitches in editaccount 2015-07-16 13:42:52 +02:00
Daniel Gultsch
babbd389f6 removed empty translation file 2015-07-16 13:29:59 +02:00
Daniel Gultsch
a31ab555b8 Merge branch 'development' of github.com:siacs/Conversations into development 2015-07-16 13:26:12 +02:00
Daniel Gultsch
7bd66549d8 made 'check image on http host' message more generic. fixed #1281 2015-07-16 13:25:52 +02:00
Daniel Gultsch
b477b8f57b fixed some npes 2015-07-16 13:14:51 +02:00
Daniel Gultsch
43fb216e72 Merge pull request #1285 from kriztan/patch-2
fixed another typo
2015-07-16 11:07:16 +02:00
Christian S.
73e703e5d4 fixed another typo 2015-07-16 10:15:26 +02:00
Daniel Gultsch
3190f114e7 Merge pull request #1283 from Manouchehri/development
Fixed broken URL.
2015-07-16 10:12:49 +02:00
Daniel Gultsch
1a36d21023 Merge pull request #1284 from kriztan/patch-1
fixed typo
2015-07-16 10:12:42 +02:00
Christian S.
612e8bd794 fixed typo 2015-07-16 07:36:35 +02:00
David Manouchehri
34aff6f8cf Fixed broken URL.
The HTTPS server is throwing GitHub's certificate instead of a proper one, so I'm going to stick with HTTP for now.
2015-07-15 18:23:59 -04:00
Daniel Gultsch
2fa9af735b mention http upload component in readme 2015-07-15 19:01:05 +02:00
Daniel Gultsch
b525b42e59 fixed crash on invalid muc bookmarks 2015-07-15 17:42:08 +02:00
Daniel Gultsch
ffffca10f0 renamed colors 2015-07-13 12:55:13 +02:00