Commit Graph

426 Commits

Author SHA1 Message Date
Santiago Torres
62527a62c1 WIP: Replace session states in the Engine classes 2016-09-19 22:39:19 -04:00
akwizgran
8a3e5bfb50 Refactor ValidationManager and fix some bugs. #619 2016-09-09 18:03:14 +01:00
akwizgran
fb9d743d11 Merge branch '627-tests-for-introduction-security-properties' into 'master'
Add one introduction test for modified response message

This is only the first part of #627, but I am putting it up for review already, since the second part will be very similar and issues found here will likely apply to both.

See merge request !306
2016-09-07 13:08:34 +00:00
akwizgran
74f9a0dd73 Use our own SOCKS implementation to talk to Tor. 2016-09-05 19:59:22 +01:00
Torsten Grote
3e39ad8a68 Add one introduction test for modified response message 2016-09-02 11:49:10 -03:00
Torsten Grote
6d7e0aab07 Reblogging and Comment UI 2016-09-02 11:53:08 +01:00
akwizgran
636b587b9c Merge branch '605-add-database-method-for-retrieving-a-contact-by-local-and-remote-author-ids' into 'master'
Add database method for retrieving a contact by local and remote author IDs

Closes #605

See merge request !302
2016-09-01 20:00:27 +00:00
Torsten Grote
6f0ffa8439 Add database method for retrieving a contact by author ID
and use it for retreiving the status of an author faster.
Also add tests for both.
2016-09-01 14:06:38 -03:00
Torsten Grote
e023e5d8fc Start RSS Feed Fetcher only after TransportEnabledEvent for Tor 2016-09-01 12:55:25 +01:00
akwizgran
d8a9d83caf Merge branch '494-implement-backend-for-reblogging-and-blog-comments' into 'master'
Add support for comments and reblogging to Blog Client

Comments and reblogs need to depend on the post they refer to.
Since message dependencies are limited to one group,
the post and also the comments need to be wrapped
when commented on or reblogged to another blog (and group).

For this reason, in addition to comments, two new wrapping message types
are introduced. They retain all data of the original messages and allow
for reconstruction and signature verification.

This MR breaks backwards compatibility with old blog posts.
It removes the content type, title and parent ID from the post.

Furthermore, it includes one commit that replaces the `Message` in `MessageSharedEvent` with a `MessageId`.

Closes #494

See merge request !285
2016-08-30 23:09:31 +00:00
Torsten Grote
fc5a7290e3 Calculate and verify signature and MAC for Introduction ACKs
Before the introducee sends her ACK,
she derives a master key from the ephemeral shared secret as before.

Two nonces and a MAC key are then derived from the master key.
The local introducee signs one of the nonces and calculates a MAC
over her own identity public key, ephemeral public key,
transport properties and timestamp.
The local introducee includes the signature and MAC in her ACK.

On receiving the remote introducee's ACK,
the local introducee verifies the signature and MAC.
Should the verification fail, an ABORT is sent to the introducer and
the remote introducee that was added as inactive is deleted again.
2016-08-30 19:58:54 -03:00
Torsten Grote
7db0e4472a Introduction Client: Add MAC and signature to ACK message
The MAC and signature are not yet generated and verified.
This will happen in a later commit.
2016-08-30 19:25:53 -03:00
Torsten Grote
65bdd5558e Address bugs and comments from reblogging code review 2016-08-30 18:52:33 -03:00
Torsten Grote
3dd3a18694 Add support for comments and reblogging to Blog Client
Comments and reblogs need to depend on the post they refer to.
Since message dependencies are limited to one group,
the post and also the comments need to be wrapped
when commented on or reblogged to another blog.

For this reason, in addition to comments, two new wrapping message types
are introduced. They retain all data of the original messages and allow
for reconstruction and signature verification.

This commit breaks backwards compatibility with old blog posts.
It removes the content type, title and parent ID from the post
message structure.
2016-08-29 13:37:20 -03:00
Torsten Grote
743fc7dd1f Do not require an entire Message for the MessageSharedEvent 2016-08-29 13:36:09 -03:00
Torsten Grote
132a03d0a9 Merge branch '364-add-mac-to-crypto-component' into 'master'
Add MAC function to crypto component



See merge request !295
2016-08-26 13:34:56 +00:00
akwizgran
625276067a Define iteration order of BdfDictionary. 2016-08-26 10:57:57 +01:00
akwizgran
30f2c192c6 Added MAC function to crypto component. 2016-08-26 10:06:24 +01:00
Torsten Grote
d93f59b4ef Merge branch '555-blog-controller' into 'master'
Blog controller thread safety

This patch removes the mutable list of posts from the blog controller to make it thread-safe, and adds a cache of message bodies to speed up reloads.

Closes #555.

See merge request !276
2016-08-24 19:36:06 +00:00
Torsten Grote
72fb4e9bc7 Post RSS entries within one transaction
This also fixes a bug where new feeds was not added properly.
2016-08-24 12:39:04 -03:00
Torsten Grote
e10f68b496 Add feed title to imported entries
Also fixes one bug where a new feed was not saved and
improved HTML stripping a bit.
2016-08-24 11:20:45 -03:00
akwizgran
1f5de42844 Added hidden service address for dev reports. 2016-08-23 10:54:21 +01:00
akwizgran
c6c62cab6c Use one connection per dev report.
This allows simpler server-side code, and a failure part-way through sending won't require restarting from the beginning next time.
2016-08-22 16:12:57 +01:00
akwizgran
98337a16ec Make BlogController thread-safe. #555 2016-08-20 16:07:04 +01:00
Torsten Grote
c3a14d9275 Add a new event that is broadcasted when a contact is verified
Also, don't support unverifying contacts.
2016-08-19 12:41:10 -03:00
Torsten Grote
e690bcb3cc Add introduced contacts as UNVERIFIED
Closes #580
2016-08-19 12:31:00 -03:00
Torsten Grote
caee7fe61b Validate New Messages for Reblogging and Comments of Blog Posts
Also includes unit tests for the new message types.

Closes #591
2016-08-15 14:28:17 -03:00
Torsten Grote
71196e3494 Let clients decide whether to share messages or not 2016-08-11 12:19:10 -03:00
akwizgran
44d13ef28e Merge branch '579-unsubscribe-from-shared-blogs' into 'master'
Allow unsubscribing from shared blogs

Only personal blogs from non-contacts can be removed.
This also adds integration tests that check the conditions under which blogs can actually be removed.

Closes #579

See merge request !268
2016-08-05 17:36:36 +00:00
Torsten Grote
1ec56fa3ef Allow unsubscribing from shared blogs
Only personal blogs from non-contacts can be removed.
This also adds integration tests that check if blogs can actually be removed.

Closes #579
2016-08-05 14:08:09 -03:00
Torsten Grote
17db03d40a Return proper Invitation objects in SharingManager
Fixes #470
2016-08-05 13:07:16 -03:00
Torsten Grote
a69a4028b0 Fix Blog Sharing Backend and Add Blog Sharing Integration Tests 2016-08-03 13:01:24 -03:00
Torsten Grote
a552d1b6a6 Show blog invitation requests and responses in private conversation 2016-08-03 13:01:24 -03:00
Torsten Grote
6454acdaa5 Post new RSS entries into the user's personal blog
Closes #486
2016-08-02 20:02:40 -03:00
Torsten Grote
8d1a26ba72 Keep track of which RSS entries have been seen
This is done by remembering the time of the latest entry.
All entries newer than that are considered new and will be posted.

Closes #485
2016-08-02 19:19:48 -03:00
Torsten Grote
e527e30712 Implement background task for fetching RSS feeds
* Implemented in briar-core as a `ScheduledExecutorService`
  that gets started when the app starts
* The briar-api has a `FeedManager` interface
  that the UI can use to register and unregister feeds
* In this first iteration, feeds are fetched via HTTP(S), not Tor

Closes #484
2016-08-02 19:18:55 -03:00
Torsten Grote
64b596d0f9 Show Responses to Forum Invitations in Private Conversation
Closes #472
2016-08-01 12:13:51 +01:00
akwizgran
32578e2cab Merge branch '535-formatexception-when-loading-contact-list-after-receiving-invitation' into 'master'
Use Client Layer Events in ContactListFragment

This prevents trying to access the same group metadata in different groups.
Also, the conversation does not need to be reloaded once introduction messages arrive.

Closes #535

See merge request !254
2016-08-01 10:21:31 +00:00
Torsten Grote
bdb876552d Allow Validator to access metadata for pending messages
Database queries for metadata only returned it for messages that were delivered already.
However, there are cases (e.g. a pending message needs to be delivered) where
the validator needs to retrieve the metadata from the database.

For these cases, a special database query has been introduced.
2016-07-29 15:17:18 -03:00
Torsten Grote
e1bdede4f5 Introduce client layer events for forums
The forum UI depended on sync layer events such as MessageStateChangedEvent.
Now, the forum client broadcasts its own high-level event (`ForumPostReceivedEvent`)
with the information the UI needs (`ForumPostHeader`).

Closes #310
2016-07-29 15:16:52 -03:00
Torsten Grote
3d22d43868 Use Client Layer Events in ContactListFragment
This prevents trying to access the same group metadata in different groups.
Also, the conversation does not need to be reloaded once introduction messages arrive.

Closes #535
2016-07-28 14:30:18 -03:00
str4d
ddbac36913 Merge branch '410-my-blogs-tab-with-option-to-add-new-blogs' into 'master'
Micro Blogs UI

**Attention:** This MR includes several other commits which are supposed to end up in separate MRs. I suggest that you review **per commit**. Once the first two commits have green light, I can split out the other commits into other MRs. This way I don't have to work myself through a long rebase chain every time I make a change to the bottom MR.

This MR is full of commits that introduce features that we will not be using initially. The last commit implements the Micro Blogs UI on top of the framework the first commits establish and hides/disables all future features for now.

I suggest we merge this as is and clean things up later when we have a clearer idea what features we will be doing eventually.

![device-2016-06-23-135016](/uploads/600fc7c28c0c6c4a60d8273ffb55f30a/device-2016-06-23-135016.png)
![device-2016-06-22-181934](/uploads/e57cfbc162150bcd01d4683d4164406e/device-2016-06-22-181934.png)
![device-2016-06-23-142422](/uploads/5814f1e13b6d2230f2e4c12a8c5cd599/device-2016-06-23-142422.png)
![device-2016-06-23-142506](/uploads/d3ac268082b98bbcd068f3d6fe0c6712/device-2016-06-23-142506.png)
![device-2016-06-22-181913](/uploads/f5dcc1ed9a40ec5fa8f634864903f4cc/device-2016-06-22-181913.png)

Closes #436 

See merge request !214
2016-07-17 03:35:36 +00:00
Torsten Grote
c577efacbe Show all Forum Invitations, not only the first 2016-07-07 14:48:28 -03:00
Torsten Grote
fd7278b488 Combined Blog Feed
This commit addes a combined blog feed that shows all posts of all
subscribed blogs in the order the blog posts have been received.

For now, this commit also hides other blog functionality like adding
additional blogs and browsing individual blogs.

Closes #417
2016-07-04 14:37:23 -03:00
Torsten Grote
91aa81041e Store and expose time a blog post was received
This is useful when sorting blog posts in the combined feed. It ensures
you do not miss older posts that were just synced to you.
2016-06-23 11:58:25 -03:00
Torsten Grote
a8f51fcb8a Backend for Automatic Personal Blogs
When a contact is added, her personal blog will also be added automatically.
Also, when a new identity is added, a personal blog for that identity is created.

Part of #436
2016-06-23 11:58:25 -03:00
Torsten Grote
30fe9f6e2a Change Blog Paradigm to Short-Form
Removes teaser and makes body mandatory.

It also adds support for deleting blogs and
introduces a getAuthorStatus() method to the IdentityManager
that takes a running transaction.
2016-06-23 10:47:44 -03:00
Torsten Grote
59320f02b7 Remove MAX_GROUP_DESCRIPTOR_LENGTH
Closes #441
2016-06-22 11:47:38 -03:00
str4d
13e3eec6b3 Implement BlogSharingManager 2016-06-18 19:02:52 +12:00
str4d
9ae64124d3 Factor out generic sharing code from ForumSharingManger 2016-06-18 19:02:48 +12:00