Abraham Kiggundu
851151041e
Pull-Merge of latest changes from main repo
2015-01-08 11:54:47 +03: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
Abraham Kiggundu
b074978472
Improved encapsulation of thread synchronisation as follows
...
- replaced use of Object instance mutex with a private final Lock object
- replaced Object signaling with specific condition signalling
2014-12-26 16:40:46 +03:00
akwizgran
388b36b6be
Check periodically for retransmittable packets. Bug #46 .
2014-12-14 20:26:41 +00:00
akwizgran
29a6596ee3
Use the transport's idle timeout, not a hardcoded value.
2014-12-14 15:18:39 +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
4009561996
Refactored PluginManager and Poller to remove non-open calls. Bug #15 .
2014-11-08 15:40:51 +00:00
akwizgran
d321bc0a3e
Renamed some inner classes to match the renamed outer class.
2014-11-06 13:53:59 +00:00
akwizgran
b27a17db88
Erase temporary secrets after deriving keys.
2014-11-06 08:39:07 +00:00
akwizgran
852a618cb3
Interrupt messaging session if contact or transport is removed.
2014-11-06 08:10:29 +00:00
akwizgran
c202b6f0ac
Renamed ConnectionManager to ConnectionDispatcher.
...
Because that's what it does.
2014-11-05 19:47:54 +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
941efb4bbe
Merged IncomingConnectionExecutor and PluginExecutor into IoExecutor.
...
We don't need two separate executors for long-running IO threads.
2014-10-02 18:02:53 +01:00
akwizgran
eaff042601
Don't try to close server sockets twice.
...
This may have been the cause of bug #69 . Removed the wait-for-shutdown
code in DroidtoothPlugin that was added to attempt to avoid that bug.
2014-05-09 19:09:13 +01:00
akwizgran
97af24cb08
Fixed lint warning: case converstion without a locale.
2014-05-01 15:13:00 +01:00
akwizgran
a2f5f68f87
Refactored TCP plugins, moving common code into superclass.
2014-04-10 13:15:53 +01:00
akwizgran
e74465dd41
Don't try to connect to unreachable IP addresses.
2014-04-05 00:00:58 +01:00
akwizgran
08b91d2483
Poll plugins when connectivity changes. Bug #66 .
...
This should enable us to connect to contacts faster at startup and
whenever a new means of connecting becomes available.
2014-04-04 22:06:36 +01:00
akwizgran
75ce6cf1da
LAN plugin should re-bind each time wifi becomes available. Bug #51 .
2014-04-04 20:04:47 +01:00
akwizgran
75f13f53a0
Refactored address parsing code into superclass. Don't use DNS.
2014-04-04 20:04:47 +01:00
akwizgran
fe82591fdf
Cleaned up address selection code for LAN and WAN plugins.
...
The LAN plugin only accepts IPv4 link-local or site-local addresses.
This rules out LANs that use globally routable addresses (such as UCL),
but also reduces the chances of the LAN plugin making observable
connections across the WAN, which could reveal the social graph.
Both plugins will attempt to reuse the previous address and port only if
there's currently an interface with that address; this will avoid
unnecessary attempts to bind to nonexistent addresses.
2014-04-04 20:04:47 +01:00
akwizgran
b99a503f24
Removed unnecessary conditionals from logging statements.
...
Very important stuff.
2014-03-12 21:00:14 +00:00
akwizgran
3a01a04cbf
Log simple names of plugin classes when polling.
2014-03-04 14:04:07 +00:00
akwizgran
511b470aa4
Less verbose logging for plugins.
2014-03-03 15:31:46 +00:00
akwizgran
90ad3caedd
Copy the collection of plugins before passing it to the poller.
2014-03-01 10:44:32 +00:00
akwizgran
a2d099ea17
Added debugging screen to alpha and beta builds. Dev task #73 .
2014-02-28 23:44:35 +00:00
akwizgran
044c10e89f
Bluetooth-only invitations: simpler and more reliable.
...
Of course, not all devices support Bluetooth...
2014-02-10 14:00:34 +00:00
akwizgran
822392f9e7
Use strings rather than hashes to identify transports. Dev task #64 .
2014-01-24 10:39:34 +00:00
akwizgran
6af3c54c28
Removed shouldFlush() from plugins, added missing PacketWriter method.
2014-01-15 17:10:25 +00:00
akwizgran
8886d954d7
Reorganised Guice modules. Contribute entropy to pool on Linux/Android.
2014-01-14 19:33:17 +00:00
akwizgran
6f161103ae
Log the timing of startup tasks so we can find bottlenecks.
2014-01-13 21:58:34 +00:00
akwizgran
832476412c
Changed the root package from net.sf.briar to org.briarproject.
2014-01-08 16:18:30 +00:00