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
effa5c9d8e
Throw checked exception if concurrent attempts are made to remove a
...
contact.
2011-11-15 09:51:51 +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
72be34768b
Minor refactoring.
2011-11-14 22:14:52 +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
94722a9f2a
Broadcast an event when an author's rating changes.
2011-10-26 15:40:38 +01:00
akwizgran
097d11f471
Exposed getMessageHeaders() through DatabaseComponent interface.
2011-10-26 15:18:02 +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
ef61eaa804
Separated MessageHeader interface from Message interface.
2011-10-21 18:42:27 +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
c828db2e95
Don't send subscription or transport updates unless an update is due.
...
An update is due if the information has changed since the last update,
or if no update has been sent for 12 hours (to ensure that lost
updates are eventually replaced).
2011-10-19 16:34:58 +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
c8b2cc38de
Record when the transports and subscriptions visible to each contact
...
were last modified.
In future this will be used to determine when to send updates.
2011-10-18 17:32:32 +01:00
akwizgran
2f457162a5
Attach the affected contact IDs to subscription update events.
2011-10-17 23:24:23 +01:00
akwizgran
ec56b12384
Converted database events from an enum to classes to allow them to
...
carry data.
2011-10-17 22:47:38 +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
a40c081815
Record when the latest subscription/transport update was sent.
2011-09-26 18:13:48 +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
124188a0a1
DatabaseComponent.setSeen() should call setStatusSeenIfVisible().
...
Otherwise an exception may be thrown if an offered message is no
longer in the DB.
2011-09-25 14:39:31 +01:00
akwizgran
98ab523092
Database refactoring to fix injection problems.
2011-09-23 18:52:56 +01:00
akwizgran
b470afb4ef
Added DatabaseComponent.setSeen() for handling requests.
...
Also moved IO out of the lock in receiveOffer().
2011-09-23 16:06:14 +01:00
akwizgran
7c6e0c349c
Extracted constants from DatabaseComponent interface.
2011-09-23 15:33:41 +01:00
akwizgran
b675c38953
Don't do IO while holding database locks.
2011-09-23 12:55:23 +01:00
akwizgran
52f3b70c3f
Added size-unlimited version of Database.getSendableMessages().
2011-09-21 18:10:22 +01:00
akwizgran
95c3fb4fed
Removed getCapacity() from BatchWriter interface.
2011-09-21 12:37:19 +01:00
akwizgran
3dd3742a96
Folded findLostBatches() into receiveAck().
2011-09-19 18:45:19 +01:00
akwizgran
7aeb6029a6
Assertions and comments.
2011-09-19 16:42:27 +01:00