Commit Graph

33 Commits

Author SHA1 Message Date
akwizgran 5044f34ba9 Moved all automatic connection logic into poller. 2016-05-06 12:11:39 +01:00
akwizgran ff8301521c Replaced Timer with ScheduledExecutorService. #258 2016-05-06 12:11:34 +01:00
akwizgran f7dbfe2551 Renamed a couple of integration tests. 2016-04-06 15:56:34 +01:00
akwizgran 205dc66572 Test cleanup. #280 2016-04-05 14:19:10 +01:00
akwizgran e58ca00979 Don't start transactions while holding locks. #272 2016-03-29 15:21:46 +01:00
akwizgran 1855dbbd2d Use a lock to ensure transaction isolation. #272 2016-03-28 13:52:12 +01:00
akwizgran 1d89c6cebc Add contact and transport keys in the same transaction.
This avoids a potential problem where the app crashes after adding the contact but before adding the transport keys, leaving the contact unusable.
2016-02-26 10:57:32 +00:00
akwizgran 247ee7eba0 Unit tests for TransportKeyManager. 2016-02-19 13:22:04 +00:00
akwizgran 3c6ead0603 Code clarity, more unit tests for ByteUtils.
Addresses comments for !48.
2016-01-12 11:10:22 +00:00
akwizgran ad0972877b Updated TestStreamEncrypter/Decrypter. 2015-12-18 13:34:02 +00:00
akwizgran f2efe7f2ea Implement stream header for BTPv2. #111 2015-12-18 13:34:02 +00:00
akwizgran 9868feeb2a Refactor KeyManager and TagRecogniser. #55 2015-12-14 11:02:49 +00:00
akwizgran 123dff3a3d Don't mix JUnit 4 annotations with JUnit3 TestCase. 2015-12-08 14:53:50 +00:00
akwizgran 027ae8340f Whitespace-only code formatting changes. 2015-11-30 09:38:25 +00:00
akwizgran 1f69f0d2f6 Variable-length frames (untested). 2015-01-05 17:35:45 +00:00
akwizgran d3bf2d59a1 Use the same maximum frame length for all transports. 2015-01-05 16:24:44 +00:00
akwizgran 358166bc12 Don't try to erase secrets from memory.
1. The things we're really trying to protect - contact identities,
message contents, etc - can't be erased from memory because they're
encapsulated inside objects we don't control.

2. Long-term secrets can't be protected by erasing them from memory
because they're stored in the database and the database key has to be
held in memory whenever the app's running.

3. If the runtime uses a compacting garbage collector then we have no
way to ensure an object is erased from memory.

4. Trying to erase secrets from memory makes the code more complex.

Conclusion: Let's not try to protect secrets from an attacker who can
read arbitrary memory locations.
2014-12-29 21:08:27 +00:00
akwizgran f316d64afa Moved stream crypto to crypto component. 2014-12-29 19:55:05 +00:00
akwizgran 388b36b6be Check periodically for retransmittable packets. Bug #46. 2014-12-14 20:26:41 +00:00
akwizgran d4fa656dbb Application layer keepalives to detect dead TCP connections.
DuplexOutgoingSession flushes its output stream if it's idle for a
transport-defined interval, causing an empty frame to be sent. The TCP
and Tor plugins use a socket timeout equal to twice the idle interval to
detect dead connections.

See bugs #27, #46 and #60.
2014-12-13 12:00:40 +00:00
akwizgran 64d644d8b8 Clean up output streams in unit test.
This fixes some lint warnings and may also fix dev task #102.
2014-12-05 19:22:35 +00:00
akwizgran c280e213c8 Don't send tags for invitation connections. 2014-11-09 17:11:16 +00:00
akwizgran c2d6e9afde Some variables were still referring to TagRecogniser by its old name. 2014-11-06 20:51:10 +00:00
akwizgran 4ca83842d1 Moved ConnectionDispatcher and ConnectionRegistry to plugins package. 2014-11-05 19:40:07 +00:00
akwizgran 7b8181e309 Massive refactoring to merge handling of simplex and duplex connections. 2014-11-04 16:51:25 +00:00
akwizgran b24f153704 Renamed a load of things from 'connection' to 'stream'. 2014-10-08 16:21:55 +01:00
akwizgran cdb5a12156 Use the event bus to observe contacts connecting and disconnecting. 2014-10-03 10:04:02 +01:00
akwizgran 8b8df435a5 Separated event infrastructure from DB. 2014-10-03 09:44:54 +01:00
akwizgran 8c18773141 Write the tag immediately even if there are no packets to send. Bug #27. 2014-03-16 18:13:31 +00:00
akwizgran 822392f9e7 Use strings rather than hashes to identify transports. Dev task #64. 2014-01-24 10:39:34 +00:00
akwizgran e5353dc6d4 Replaced AuthenticatedCipher opmode with a boolean. 2014-01-16 18:59:02 +00:00
akwizgran 8886d954d7 Reorganised Guice modules. Contribute entropy to pool on Linux/Android. 2014-01-14 19:33:17 +00:00
akwizgran 832476412c Changed the root package from net.sf.briar to org.briarproject. 2014-01-08 16:18:30 +00:00