Commit Graph

1164 Commits

Author SHA1 Message Date
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
839f67dd44 Replaced last connection time with time of last private message. 2014-04-05 18:14:36 +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
e260aac3d2 All tryToClose() methods should check for null arguments. 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
fbe1c799dd Added canary code to catch bugs #55 and #65. 2014-04-04 02:23:32 +01:00
akwizgran
79166e9b2f Reject subscription updates with duplicate entries. Bug #65. 2014-04-04 01:08:36 +01:00
akwizgran
1c282a8835 Show when private messages have been delivered. 2014-04-03 23:42:24 +01:00
akwizgran
2f9ef8fcaf Log the running time of ECDH shared secret derivation. 2014-03-22 17:06:42 +00:00
akwizgran
fc66f6ed8a Log the running time of key validation and message verification. 2014-03-22 00:30:29 +00:00
akwizgran
007ddac880 Use the Montgomery ladder multiplier to avoid side-channel attacks. 2014-03-19 22:52:53 +00: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
b270f0e8b1 Call Thread.currentThread().interrupt() when handling interruption. 2014-03-12 21:11:11 +00:00
akwizgran
b99a503f24 Removed unnecessary conditionals from logging statements.
Very important stuff.
2014-03-12 21:00:14 +00:00
akwizgran
a2b3ef9e62 If Bluetooth is activated to add a contact, deactivate it afterwards.
Bug #47.
2014-03-10 19:06:14 +00:00
akwizgran
d151633a60 Store settings in the DB, listen for events when settings are updated. 2014-03-10 17:59:13 +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
581ba7139a Don't overselect rows when unsetting inbox group. Fixes bug #40. 2014-03-02 17:58:00 +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
de5dac6ce3 Reset message status when contact unsubscribes from group. Dev task #68. 2014-02-27 14:24:52 +00:00
akwizgran
1cbaae0734 Database.setInboxGroup() doesn't require message lock. 2014-02-27 12:49:57 +00:00
akwizgran
44c39e6e4a The list of available groups contained duplicates due to a SQL error. 2014-02-10 23:55:02 +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
71a31c2a7a Include creation time in LocalAuthor.
This allows the oldest LocalAuthor to be used as the default.
2014-02-10 12:14:09 +00:00
akwizgran
0960a345e0 Argh, god damn it, removed Java 1.6 methods again. 2014-02-09 19:36:25 +00:00
akwizgran
9e8bf5b1aa Set a flag in MessageHeader to indicate whether the message is local. 2014-02-09 16:02:11 +00:00
akwizgran
4154119ea5 Convert to and from UTF-8 without catching impossible exceptions.
All JVMs must support UTF-8 encoding.
2014-02-07 22:02:02 +00:00
akwizgran
f6360c09d4 Added utility methods for converting string to UTF-8 and vice versa. 2014-02-07 22:00:51 +00:00
akwizgran
0626fe6c7c Removed unused StringUtils methods (one was moved to the sandpit). 2014-02-07 20:07:42 +00:00
akwizgran
92d5fb4f1d Compact encodings for integers, strings and byte arrays.
This adds complexity but will save a lot of bandwidth, as most of the
strings and byte arrays we want to send are less than 128 bytes.

The extra complexity isn't exposed outside of the serial component.
2014-02-07 18:50:28 +00:00
akwizgran
1ac8524dc2 Allow the code and the DB to have different but compatible schemas.
We check for compatibility by specifying a schema version and minimum
schema version in the code, storing them in the DB, and checking whether
the DB is too old for the code or vice versa.
2014-02-04 19:51:41 +00:00
akwizgran
a45d09ef5c Show whether identities are anonymous, unknown, or verified.
Dev task #52. Known but unverified identities are also supported, but
currently unused. These will be used in future for contacts who've been
introduced but not verified face to face.
2014-02-04 12:32:51 +00:00
akwizgran
cde4ca574f Check that author and group names aren't empty. 2014-01-31 17:23:14 +00:00
akwizgran
93890d56f6 GroupReader was looking for an optional key, not a mandatory salt.
This should've been changed when restricted groups were removed.
2014-01-31 17:21:51 +00:00
akwizgran
905eaa5c69 DB cleaner counts transactions rather than bytes stored. Dev task #55. 2014-01-25 13:39:55 +00:00
akwizgran
c67869dac1 Skip special files (symlinks etc) when calculating disk space. 2014-01-25 13:39:12 +00:00
akwizgran
822392f9e7 Use strings rather than hashes to identify transports. Dev task #64. 2014-01-24 10:39:34 +00:00
akwizgran
569b59624a Use a daemon thread for the timer. 2014-01-16 19:15:33 +00:00
akwizgran
e5353dc6d4 Replaced AuthenticatedCipher opmode with a boolean. 2014-01-16 18:59:02 +00:00
akwizgran
4ac85e955f Deterministic signatures (RFC 6979). 2014-01-16 18:52:59 +00:00
akwizgran
f97039318a Use integer maths to convert bits to bytes. 2014-01-16 18:02:34 +00:00
akwizgran
14e1cd6072 Normalise elliptic curve points. 2014-01-16 15:35:25 +00:00
akwizgran
a168a7ba89 Upgraded to BouncyCastle 1.50. Added bouncy -> spongy conversion script. 2014-01-16 15:21:42 +00:00
akwizgran
6af3c54c28 Removed shouldFlush() from plugins, added missing PacketWriter method. 2014-01-15 17:10:25 +00:00