Commit Graph

158 Commits

Author SHA1 Message Date
Torsten Grote 86f650503b Re-introduce InvitationResponse
This was done, so private responses don't need to include a Nameable already.
Retreiving a nameable is tricky and requires a data migration,
so we just don't do it now.
2018-09-18 10:10:21 -03:00
Torsten Grote d430b4fd2d Move introduction role into IntroductionResponse 2018-09-18 10:10:21 -03:00
akwizgran fcf7cf72ea Refactor doesExist() method. 2018-09-18 10:10:21 -03:00
Torsten Grote 183fe08565 Rename object to nameable 2018-09-18 10:10:21 -03:00
Torsten Grote 7e32697696 Use ConversationManager to retrieve messages
This removes the public method for retrieving messages
from individual conversation clients
and just leaves methods that require a transaction
to be used by the ConversationManager only.
2018-09-18 10:10:21 -03:00
Torsten Grote 29758b174a Unify all events related to private messages 2018-09-18 10:10:21 -03:00
Torsten Grote 61e18f104e Unify all private message responses in one PrivateResponse class
This also adds `Shareable`s to invitation response
which is a precondition for #561
2018-09-18 10:10:21 -03:00
Torsten Grote ffeca8817f Prepare private message retrieval through ConversationManager 2018-09-18 10:10:21 -03:00
Torsten Grote 59fae2fa3c Unify all private message requests in one PrivateRequest class 2018-09-18 10:10:21 -03:00
Torsten Grote 2d9345c018 Remove unnecessary information from private message classes 2018-09-18 10:10:21 -03:00
akwizgran 74e4a9cbdf Remove raw representation from Message class. 2018-09-05 11:23:36 +01:00
akwizgran 0bc07cd0c1 Rename message length method. 2018-08-24 16:56:24 +01:00
akwizgran 27a169c6e2 Minimise use of message constructor. 2018-08-24 14:17:25 +01:00
akwizgran 287f3760cd Pass database key into LifecycleManager. 2018-07-27 15:46:48 +01:00
akwizgran 6ca0339da2 Move DB key management into account manager. 2018-07-27 13:15:03 +01:00
akwizgran f9495b49d6 Move encrypted key, account deletion into AccountManager. 2018-07-27 13:14:57 +01:00
akwizgran cb29c9bf32 Create minimal AccountManager interface. 2018-07-27 13:14:52 +01:00
akwizgran 8283760e8a Move local author creation into IdentityManager. 2018-07-27 13:14:51 +01:00
Torsten Grote 20422edf78 Introduction: Reset session information for removed introducees 2018-05-21 16:26:11 -03:00
akwizgran 75bd7927ac Decouple DevReportSender from TorPlugin. 2018-05-17 09:20:12 +01:00
akwizgran 5320737d49 Send end of stream marker when sync session finishes. 2018-05-08 14:41:53 +01:00
akwizgran c1b8552c2b Merge branch 'introduction-test-fix' into 'master'
Fix introduction test non-determinism

See merge request akwizgran/briar!781
2018-04-30 08:05:00 +00:00
Torsten Grote d9ed4a3ac9 Fix introduction test non-determinism 2018-04-29 13:33:59 -03:00
akwizgran 215c62ed23 Use generic record reader/writer for sync. 2018-04-29 17:26:42 +01:00
akwizgran c55bef95ce Fix rebasing mistakes. 2018-04-29 16:40:29 +01:00
akwizgran c5efb6e16d Move versioning client to its own package. 2018-04-29 16:40:27 +01:00
akwizgran 57a6c8cb3a Separate the crypto executor into its own module.
This allows it to be replaced for testing.
2018-04-29 16:40:26 +01:00
akwizgran 6942a368d4 Don't share groups unless the contact supports the client. 2018-04-29 16:40:26 +01:00
akwizgran 2e570ba50d Rename client version to major version. 2018-04-29 16:40:23 +01:00
akwizgran f4c5855dd8 Use client versioning for private groups. 2018-04-29 16:39:53 +01:00
akwizgran be309057cd Use client versioning for blogs and forums. 2018-04-29 16:39:53 +01:00
akwizgran 85c11f8e1f Remove redundant checks when adding contacts.
Hooks are now called exactly once per contact.
2018-04-29 16:39:52 +01:00
akwizgran 8c00f2417b Add client version to groups table. 2018-04-29 16:39:51 +01:00
akwizgran a38f39207f Initial implementation of client versioning client. 2018-04-29 16:39:51 +01:00
akwizgran 6e42377b74 Don't automatically respond to declined introduction. 2018-04-28 00:11:45 +01:00
Torsten Grote 5f6af4e40f Fix introduction response messages in UI and some minor fixes 2018-04-27 16:22:10 -03:00
Torsten Grote 44f5a9db1e Address last review comments 2018-04-27 11:04:08 -03:00
Torsten Grote 80a9689316 Address second round of review comments 2018-04-26 20:39:17 -03:00
Torsten Grote 337f7e7b8f Unify introduction response methods and handle ProtocolStateException
It is possible that a remote DECLINE message arrives short before the
user responds to the introduction.
This will cause a ProtocolStateException which (for now) is just caught
and a generic (existing) error message will be shown.
2018-04-26 18:18:31 -03:00
Torsten Grote f8f98ed95d Properly handle DECLINE messages in START state
Previously, DECLINE messages let directly to the START state
for introducer and introducees.
So incoming ACCEPT and DECLINE messages needed to be ignored in START state
introducing undefined behavior into the protocol.

This is fixed with this commit by adding two additional states
to the introducer state machine as well as making use of the existing
LOCAL_DECLINED state for the introducees.
2018-04-26 18:00:57 -03:00
Torsten Grote bd5504de26 Add a MAC to the ACTIVATE message to prevent the introducer to fake them
A fake ACTIVATE message would cause us to activate the transport keys
before the contact has received our auth message,
which would compromise forward secrecy.
2018-04-26 16:56:38 -03:00
Torsten Grote 0e04044ebb Ensure that incoming messages are expected in the current state
Previously, the introducer would process and forward invalid messages by
the introducees. This commit adds the necessary checks and tests.
2018-04-26 11:18:04 -03:00
Torsten Grote 0a5d408686 Add a test for when one introducee had deleted the other one 2018-04-25 14:42:17 -03:00
Torsten Grote f94db28035 Handle and test introductions to existing contacts 2018-04-25 13:30:51 -03:00
Torsten Grote b291fcd2cd Only allow new introductions in START state
When the user attempts an introduction, instead of the introduction
message input field, an explanatory text will be shown and the
introduction can not be made until the last one has been finished.
2018-04-25 12:05:15 -03:00
Torsten Grote 94a6137a42 Also validate encoded message in MessageEncoder test 2018-04-25 10:52:32 -03:00
Torsten Grote 72e9a9d807 Address first round of review comments for new IntroductionClient 2018-04-25 10:43:56 -03:00
Torsten Grote a9b678df32 Remove broken and deprecated MessageQueue as it is not needed anymore
Closes #308
2018-04-25 10:14:04 -03:00
Torsten Grote f81ef30b47 Replace old introduction client with new one 2018-04-25 10:14:01 -03:00
Torsten Grote d57102ed90 IntroductionCrypto: Create dedicated class to handle introduction related crypto 2018-04-25 10:13:40 -03:00