Commit Graph

80 Commits

Author SHA1 Message Date
akwizgran
b4f0da53b5 Use a separate linked list for each contact, containing visible groups. 2012-05-17 23:08:57 +02:00
akwizgran
2f4b347cdf Keep a linked list of the IDs of subscribed groups. 2012-05-17 21:25:10 +02:00
akwizgran
d78081b57d Increased some timeouts and added latches to stop tests failing under
heavy load.
2012-03-28 23:30:45 +01:00
akwizgran
02c516492f Moved connection window size to TransportConstants. 2012-01-19 22:13:26 +00:00
akwizgran
99caec9448 Refactoring.
Unidirectional transports and connections are now called
simplex rather than batch. Bidirectional transports and connections
are now called duplex rather than stream.
2012-01-11 17:00:47 +00:00
akwizgran
f9f41acde9 Added a connection registry to avoid creating redundant connections. 2011-12-09 17:34:58 +00:00
akwizgran
6e080bb35d Dedicated executors for plugins and the connection recogniser. 2011-12-08 16:11:24 +00:00
akwizgran
caf5f34828 Refactoring: moved high-level connection classes to protocol package. 2011-12-08 15:06:50 +00:00
akwizgran
b7c3224618 Decouple the database from IO.
This will enable asynchronous access to the database for IO threads.
2011-12-07 00:23:35 +00:00
akwizgran
046becd388 Shutdown manager (untested on Windows). 2011-11-18 17:13:55 +00:00
akwizgran
2b45cf0dd1 Accept connections asynchronously. 2011-11-17 18:59:34 +00:00
akwizgran
f6ae4734ce Forward secrecy.
Each connection's keys are derived from a secret that is erased after
deriving the keys and the secret for the next connection.
2011-11-16 15:35:16 +00:00
akwizgran
d02a68edfc Return a connection context for outgoing connections (the secret will
be included in this context in the near future).
2011-11-15 17:47:30 +00:00
akwizgran
9220bb3426 Key derivation function based on NIST SP 800-108. 2011-11-15 17:19:11 +00:00
akwizgran
6a15c03e81 Store the incoming and outgoing secrets separately. 2011-11-15 16:07:14 +00:00
akwizgran
df054b1743 Store each connection window slot as a database row.
This is less memory-efficient but necessary for the coming forward
secrecy changes.
2011-11-15 13:08:20 +00:00
akwizgran
6fd8493d3d Singleton lists and singleton sets aren't equal, so use lists
consistently.
2011-11-15 09:42:21 +00:00
akwizgran
2ad15518a5 Return transports that have no properties. 2011-11-15 09:00:51 +00:00
akwizgran
73aa7d14d7 Split transport identifiers into two: TransportId (globally unique)
and TransportIndex (locally unique).

This is the first step towards forward secrecy. Also removed the
Writable interface and unnecessary user-defined types, moved various
constants to ProtocolConstants and renamed some classes.
2011-11-14 21:40:05 +00:00
akwizgran
48d638746c Invitation API and two (untested) implementations. 2011-10-27 17:52:03 +01:00
akwizgran
7d73f9604d Added a method for getting unread message counts for all groups. 2011-10-26 17:56:35 +01:00
akwizgran
6d91603bf7 Moved MessageHeader into DB component and added read/starred flags. 2011-10-26 17:07:09 +01:00
akwizgran
0f6b0e88c1 Added message flags: read/unread and starred/unstarred. 2011-10-26 16:32:30 +01:00
akwizgran
d2bac9a4f8 Test and bugfix for getMessageHeaders(). 2011-10-26 14:52:18 +01:00
akwizgran
2628823db7 Added a method to get all message headers in a given group (untested). 2011-10-25 17:12:37 +01:00
akwizgran
9ec8feec78 Added a method for retrieving the message body from the DB. 2011-10-21 20:42:43 +01:00
akwizgran
f2d80825bc Separated the subject line from the message body. 2011-10-21 18:25:25 +01:00
akwizgran
4d23e14d89 Unit tests for subscription and transport timestamps. 2011-10-19 16:41:32 +01:00
akwizgran
93cd31fa2d Simplify Database methods, move logic to DatabaseComponent. 2011-10-19 15:54:56 +01:00
akwizgran
dbdbb1d8d4 Never reuse contact IDs. 2011-10-19 12:43:44 +01:00
akwizgran
631f4e74b5 Nudge the database API in the direction of sanity. 2011-10-11 19:08:10 +01:00
akwizgran
a49a95347f Use dedicated classes for transport properties and configs. 2011-10-11 17:28:47 +01:00
akwizgran
68b82ae826 Retrieve all remote transports from the DB in a single call. 2011-10-10 22:35:46 +01:00
akwizgran
8940dc83cb Replaced assertTrue(Arrays.equals()) with assertArrayEquals(). 2011-10-05 17:07:52 +01:00
akwizgran
c054e1c00e Replaced some sleeps with latches. 2011-10-05 16:51:26 +01:00
akwizgran
74ca71d9c1 Check for symlinks when deleting directories. Allow Database.open()
and close() to throw IOExceptions as well as DatabaseExceptions.
2011-10-03 18:35:18 +01:00
akwizgran
72b594d270 Type-safe transport IDs. 2011-09-30 12:52:29 +01:00
akwizgran
7190509ede Use numeric IDs rather than names to identify transports. 2011-09-29 15:40:09 +01:00
akwizgran
a1b664b639 More refactoring to connect ConnectionRecogniser to ConnectionReader.
Added TestDatabaseModule so tests can specify their own DB
configuration. The modules are currently too tightly coupled - see
whether any dependencies can be removed.
2011-09-28 14:21:38 +01:00
akwizgran
53b5a61ab3 Replaced Database.getParent() with getGroupMessageParent().
The new method checks whether the parent is present in the database
and belongs to the same group, so separate methods for those checks
have been removed.
2011-09-26 18:00:56 +01:00
akwizgran
f18c86b0d3 Unit tests for private messages. 2011-09-16 13:06:04 +01:00
akwizgran
8ec40587b2 Check for sendable private messages as well as group messages. 2011-09-13 16:15:50 +01:00
akwizgran
b78cfa6c88 More DB support for private messages - needs unit tests. 2011-09-13 15:40:33 +01:00
akwizgran
1d25b5a92e Use null instead of MessageId.NONE and AuthorId.NONE, as for other
optional fields.
2011-09-13 14:04:23 +01:00
akwizgran
531d54c1d3 Removed unnecessary transaction commit. 2011-09-07 11:18:07 +01:00
akwizgran
0a84a01235 Allow identical batches to be sent to multiple contacts. 2011-09-07 11:15:34 +01:00
akwizgran
5e0aadd373 Moved the subscription and transport timestamps out of the contacts
table so it's not necessary to hold a write lock on the (heavily used)
contacts table to update them.
2011-08-14 14:46:12 +02:00
akwizgran
151a360587 Store shared secrets in the database (the crypto component will be
responsible for wrapping/unwrapping them).
2011-08-11 15:41:52 +01:00
akwizgran
e0b86f1232 Moved ConnectionWindow into the transport module and implemented
window sliding (untested).
2011-08-11 13:22:23 +01:00
akwizgran
d5d03192e3 Basic connection window persistence. 2011-08-11 12:56:21 +01:00