Commit Graph

1067 Commits

Author SHA1 Message Date
akwizgran cccdacc3e4 Upgrade to Android Studio 3.1. 2018-05-02 14:34:34 +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 fd78139a5a Remove stale comments. 2018-04-29 16:40:29 +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 f25fbc5b94 Merge registration methods for clients and hooks. 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 c4e9b6f2ab Remove debug logging. 2018-04-29 16:40:26 +01:00
akwizgran 05deaf42e3 Store and exchange client minor versions.
These don't affect client visibility.
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 cadb17987c Use client versioning for messaging. 2018-04-29 16:39:54 +01:00
akwizgran e76f114a72 Use client versioning for introductions. 2018-04-29 16:39:54 +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 114044ee5f Use client version to register validators, delivery hooks. 2018-04-29 16:39:52 +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 68132d893b IntroduceeProtocolEngine uses wrong role when adding keys. 2018-04-28 23:04:08 +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
akwizgran 23f0864d8b Don't track invisible decline message. 2018-04-27 18:35:07 +01:00
akwizgran c0dfe3e85a Sent automatic decline when other introducee declines. 2018-04-27 17:33:24 +01:00
Torsten Grote 99dba69c87 Only add transport properties and keys when the contact was added
This will be changed once we have a way to reset state for peers
that were contacts already at some point in the past.
One contact might have deleted the other, but not vice versa.
So they have mismatching state that needs to be reset.

See #2 for more information.
2018-04-27 11:30:18 -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 1bc29fec06 IntroductionManager and Protocol Engines 2018-04-25 10:13:41 -03:00
Torsten Grote d57102ed90 IntroductionCrypto: Create dedicated class to handle introduction related crypto 2018-04-25 10:13:40 -03:00
Torsten Grote e1fae7ad95 Implement SessionEncoder and SessionParser 2018-04-25 10:13:40 -03:00
Torsten Grote 672a52b2e5 Implement MessageEncoder and MessageParser 2018-04-25 10:13:39 -03:00
Torsten Grote 155c6a5613 Messages and Validator for new Introduction Client 2018-04-25 10:13:39 -03:00
akwizgran 0217c205a1 Add constant-time method for verifying MACs. 2018-04-25 12:23:46 +01:00
akwizgran 615f527270 Renamed method that now runs on IoExecutor. 2018-04-24 17:43:28 +01:00
goapunk 69c34adae3 Remove createTestData() 2018-04-24 16:57:02 +02:00
goapunk fe213d46e3 Address review comments 2018-04-24 16:05:46 +02:00
goapunk ac1bfcae60 Make test data creation configurable. 2018-04-24 12:29:20 +02:00