Commit Graph

2079 Commits

Author SHA1 Message Date
akwizgran
845d3fa47e Bumped expiry date to 1 May 2016. 2016-04-01 12:21:58 +01:00
akwizgran
e44329a2b4 Removed debug logging from message queue manager. 2016-03-31 12:34:53 +01:00
akwizgran
4393517f31 Merge branch '118-contact-introductions' into 'master'
Contact Introduction Backend

This MR allows you to introduce two of your contacts to each other. They both will receive an introduction with an optional message and then can accept or refuse the introduction which is presented as a notification.

When reviewing, I propose to review the individual commits separately as I took great care to split functional independent parts into separate commits. You might also want to have a look at the [Introduction Client Wiki page](https://code.briarproject.org/akwizgran/briar/wikis/IntroductionClient) to better understand what is going on before looking into the actual code.

Protocol sessions and states are not yet deleted and the UI is still missing (#253). In order to practically test this feature, the UI from !122 is needed.

See merge request !116
2016-03-31 11:26:09 +00:00
akwizgran
db6c813522 Merge branch '117-qr-contacts' into 'master'
BQP with QR codes

This MR implements BQP for key agreement over short-range transports. It also implements the Android UI for using BQP with QR codes.

Closes #117.

See merge request !84
2016-03-31 11:21:02 +00:00
akwizgran
5d1084ae84 Fixed a stupid forum post validation bug.
The signature covers the forum post body, not the message body.
2016-03-31 12:06:28 +01:00
Torsten Grote
54f320465f Add information about whether Contact is active to ContactAddedEvent 2016-03-30 13:36:14 -03:00
Torsten Grote
f44cb5ff94 Add an IntroductionManager and Validator
This Introduction BSP Client uses its own group to communicate with
existing contacts. It uses four types of messages to facilitate
introductions: the introduction, the response, the ack and the abort.

The protocol logic is encapsulated in two protocol engines, one for the
introducer and one for the introducee. The introduction client keeps the
local state for each engine, hands messages over to the engines and
processes the result and state changes they return.
2016-03-30 13:36:14 -03:00
Torsten Grote
e3459fb0a3 Use given transaction when adding remote properties in TransportPropertyManager. 2016-03-30 13:36:13 -03:00
Torsten Grote
5bde14c694 Add a contactExists() method to the contactManager
This requires exposing the `containsContact()` method to the `DatabaseComponent`
and is needed for finding out efficiently whether a contact already exists.
2016-03-30 13:36:13 -03:00
Torsten Grote
e2d64e0a8c allow adding contacts within an existing transactions 2016-03-30 13:36:13 -03:00
Torsten Grote
51c3528efa Add log statements to MessageQueueManagerImpl in order to find bug #272 2016-03-30 13:36:13 -03:00
akwizgran
9fbebe2226 Merge branch '272-message-queue-flow-control' into 'master'
Save queue state before delivering message. #272

Another attempt to fix #272...

See merge request !125
2016-03-30 16:35:36 +00:00
akwizgran
89d25d35d2 Save queue state before delivering message. #272 2016-03-30 17:15:45 +01:00
akwizgran
e78ba2e806 Key derivation fixes, renamed a key derivation method. 2016-03-30 12:02:49 +01:00
akwizgran
eeaa7e3813 Merge branch '272-transaction-isolation' into 'master'
Transaction isolation. #272

When client transactions were implemented the DB's read-write lock was removed, exposing H2's transaction isolation semantics. The default isolation level is "read committed", which allows concurrent transactions to overwrite each other's updates. This was the cause of #272. Changing H2's isolation level to "serialisable" would have caused other problems.

The solution is to reintroduce the DB's read-write lock. The lock is acquired when starting a transaction and released when committing or rolling back a transaction. (We already use try/finally blocks to ensure every transaction is committed or rolled back.) Read-only transactions can share the lock. To avoid deadlock, transactions must not be started while holding other locks.

This patch adapts the key manager to the new locking rules. The rest of the code was already compliant. Transports are now added to the DB during the startup phase, which allows TransportAddedEvent and TransportRemovedEvent to be deleted.

Fixes #269, fixes #272.

See merge request !124
2016-03-30 09:40:33 +00:00
akwizgran
a8fa6339fb Don't disable Bluetooth, always reuse the connection. 2016-03-30 10:38:38 +01:00
akwizgran
ed6c3fb1e3 Expect runtime exceptions from camera API methods. 2016-03-29 17:22:59 +01:00
akwizgran
1cdba02752 Updated javadocs for database methods. 2016-03-29 16:10:40 +01:00
akwizgran
e58ca00979 Don't start transactions while holding locks. #272 2016-03-29 15:21:46 +01:00
akwizgran
685a864b43 Unit tests for transaction isolation. #272 2016-03-28 13:52:54 +01:00
akwizgran
1855dbbd2d Use a lock to ensure transaction isolation. #272 2016-03-28 13:52:12 +01:00
akwizgran
9714713d73 Add transports to DB during startup. #269 2016-03-28 13:47:23 +01:00
akwizgran
0417639410 Merge duplex and simplex plugin config classes. 2016-03-28 11:28:46 +01:00
str4d
0f7131b83b Replace BT introduction activity with BQP QR code activity 2016-03-26 15:53:13 +13:00
str4d
8cacc73bef Implement BQP Android UI using QR codes 2016-03-26 15:53:09 +13:00
str4d
701cfdba48 Extract contact exchange protocol from BT introduction protocol 2016-03-26 15:53:02 +13:00
str4d
d7c7a72710 Factor out loading screen activity XML 2016-03-26 15:53:02 +13:00
str4d
5ff7adcebf Test BQP implementation 2016-03-26 15:53:02 +13:00
str4d
c3997fb06f Implement BQP API 2016-03-26 15:53:02 +13:00
str4d
ce7c189923 Create BQP API 2016-03-26 15:53:02 +13:00
str4d
d2d8d9d46e Implement BQP transport descriptors 2016-03-26 15:52:58 +13:00
akwizgran
65316414ea Added toString() method to TransportId. 2016-03-22 16:07:20 +00:00
akwizgran
31f6c0bf50 More logging for MessageQueueManagerImpl. #272 2016-03-22 13:46:27 +00:00
akwizgran
f20a1e8dfe Fix merge problems in TransportPropertyValidatorTest. 2016-03-16 15:37:54 +00:00
akwizgran
89ca0e5a26 Merge branch 'property-validator-test' into 'master'
TransportPropertyValidatorTest

Tests for the TransportPropertyValidator ValidateMessage call.

See merge request !110
2016-03-16 14:53:00 +00:00
akwizgran
e39a74bd40 Finish SplashScreenActivity when starting next activity.
Fixes #270.
2016-03-15 20:58:57 +00:00
akwizgran
d605e1cae4 Reverted text colour to black.
@color/briar_text_primary is used in a lot of places other than the settings screen - if we want to use grey text in the settings screen we'll need to find another way.

Also fixed some misspelled resource names and included the colours from the Briar palette in color.xml.
2016-03-15 20:46:24 +00:00
akwizgran
3d57516258 Fixed merge issues. 2016-03-15 20:26:50 +00:00
akwizgran
c2a1cc1e4e Merge branch '247-dagger-2' into 'master'
247 dagger 2

This MR in a nutshell replaces Guice and Roboguice with Dagger 2, which offers a lot more possibilities than is implemented in this branch, such as using lazy injections for performance purposes. With Dagger 2 all the magic happens at compile time, so no need to worry about unfulfilled injections at runtime, but due to restrictions I was forced to put injected test code into an Android module. We therefore have a new test module, `android-test`.

A consequence of using Dagger 2 is that we no longer have a view injector and I therefore had to replace those with manual references. 

Closes #247 

See merge request !118
2016-03-15 20:02:14 +00:00
Ernir Erlingsson
11bfa212cc minor tweaks 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
85c66417b5 branch cleanup 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
686729b045 refactor with master and fixed files that were accidentally clobbered 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
4da63b3800 Modified the project structure, removed module extension and went instead for a non-complete core dependency graph 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
7670bc48ea Removed unecessary module 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
6f233070fe Semi-encapsulated the core/api dependency graphs and created a proper structure to load eager singletons 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
10764d727b rebased with master 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
9af3ce123a Added eager singletons and made some fixes 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
5aba1d79f1 Fixes after comments, also removed the CryptoComoponent from the IdentIcons 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
95d89553d5 merged with master 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
ac5d68df81 Added dependency verifications and removed Splash header 2016-03-14 21:01:21 +01:00