Commit Graph

  • 9abe920edb Plugin code cleanup. akwizgran 2011-12-09 00:08:15 +00:00
  • 2494ff1a1e Let the plugin determine whether to flush the output stream after each packet. akwizgran 2011-12-08 22:13:35 +00:00
  • 844ae8f0a7 Plugins may dispose of resources differently depending on whether a connection was recognised. akwizgran 2011-12-08 18:56:53 +00:00
  • 0fdc69ff00 Unit tests for OutgoingBatchConnection. akwizgran 2011-12-08 17:46:28 +00:00
  • 6962814eec Log the exception class when logging exceptions. akwizgran 2011-12-08 17:28:05 +00:00
  • 9f0b865ba8 Plugins should use the executor rather than creating threads. akwizgran 2011-12-08 16:57:24 +00:00
  • c6b6c20205 Bind instances rather than singletons. akwizgran 2011-12-08 16:37:09 +00:00
  • e3242ebb06 Read the tag on a connection recogniser thread, don't block the plugin. akwizgran 2011-12-08 16:33:48 +00:00
  • 6e080bb35d Dedicated executors for plugins and the connection recogniser. akwizgran 2011-12-08 16:11:24 +00:00
  • caf5f34828 Refactoring: moved high-level connection classes to protocol package. akwizgran 2011-12-08 15:06:50 +00:00
  • 1886609bef Removed frame padding code (soon to be obsolete). akwizgran 2011-12-08 14:35:52 +00:00
  • d9fc8d18d1 Better handling of InterruptedExceptions. akwizgran 2011-12-08 13:55:19 +00:00
  • c1ab21ba2f Don't generate acks faster than the IO thread can write them. akwizgran 2011-12-08 12:56:00 +00:00
  • ae87100c8f Moved batch ID calculation off the IO thread. akwizgran 2011-12-08 12:51:34 +00:00
  • d91f96b5e2 Close the writer when the reader closes; only dispose of the connection once. akwizgran 2011-12-08 00:06:05 +00:00
  • b95753bb24 Use a BlockingQueue to simplify synchronisation. akwizgran 2011-12-07 23:38:43 +00:00
  • c728377ae1 Removed the DB listener when the connection is closed. akwizgran 2011-12-07 21:37:13 +00:00
  • e2cb1027af Moved message verification into a separate thread pool. akwizgran 2011-12-07 21:33:14 +00:00
  • 22dfe947fa Minor code cleanup. akwizgran 2011-12-07 21:02:18 +00:00
  • 2020f60ebf Rewrote StreamConnection to decouple the database from IO. akwizgran 2011-12-07 20:52:04 +00:00
  • 5099979b9d Encapsulate the database thread pool and task queue. akwizgran 2011-12-07 14:34:16 +00:00
  • a9a81f0870 Removed unnecessary calls to MessageDigest.reset(). akwizgran 2011-12-07 13:37:13 +00:00
  • 1c41ffa7af Don't accept empty acks, batches or offers. akwizgran 2011-12-07 13:32:17 +00:00
  • 495baf8c70 BATCH_ID and MESSAGE_ID don't need to be structs. akwizgran 2011-12-07 00:38:14 +00:00
  • b7c3224618 Decouple the database from IO. akwizgran 2011-12-07 00:23:35 +00:00
  • 45a51b4926 ExceptionHandler interface. akwizgran 2011-12-06 10:58:26 +00:00
  • 0b749ca9e5 Javadoc. akwizgran 2011-12-06 10:53:09 +00:00
  • 00df158ad6 Ensure semaphore is released if an exception is thrown. akwizgran 2011-12-06 00:03:05 +00:00
  • f474ed229d Limit the number of waiting database writes to avoid running out of memory. akwizgran 2011-12-05 23:16:27 +00:00
  • e24a3218ca Moved message verification and DB writes off the IO thread. akwizgran 2011-12-05 22:52:00 +00:00
  • ab722f9371 Minor refactoring. akwizgran 2011-12-02 16:32:50 +00:00
  • 6752781835 Removed redundant padding check. akwizgran 2011-12-02 16:24:00 +00:00
  • 726799d848 Check that padding is set to zero. akwizgran 2011-12-02 16:21:20 +00:00
  • 4ab5dfcac0 Allow empty frames. akwizgran 2011-12-02 16:10:44 +00:00
  • c8338f9866 Connection readers and writers don't need the connection context. akwizgran 2011-12-02 14:23:45 +00:00
  • 51d58fadad Include the frame number in the header. akwizgran 2011-12-02 13:37:44 +00:00
  • 14d5e6fe64 Replaced encrypted IVs with pseudo-random tags. akwizgran 2011-12-02 12:57:39 +00:00
  • f3fdd85996 Renamed "encrypted IVs" as "tags" (actual crypto changes to follow). akwizgran 2011-12-02 12:02:55 +00:00
  • f7360cddde Renamed "user-defined types" as "structs" in the serialisation format. akwizgran 2011-12-02 11:36:45 +00:00
  • 2fb797a197 Throw an exception rather than blocking if a transaction is started after the database has closed. akwizgran 2011-12-01 20:05:45 +00:00
  • 28b9e399ae Don't swallow interrupts. akwizgran 2011-12-01 19:49:22 +00:00
  • 2a38efd13a Added the Bouncy Castle sources. akwizgran 2011-11-29 21:10:22 +00:00
  • 851a44eb40 Return a copy when explicitly asked for one (fixes a test). akwizgran 2011-11-29 21:09:48 +00:00
  • e5c8a1415d Use a single SecureRandom instance to avoid blocking on creation. akwizgran 2011-11-29 21:07:50 +00:00
  • a3067dbff8 Don't create copies of erasable keys. akwizgran 2011-11-29 11:03:57 +00:00
  • 7bf2ee64a8 Use immutable collections for thread safety. akwizgran 2011-11-29 11:01:09 +00:00
  • 42430272f4 Removed the initiator flag from the IV (no longer needed with the new key derivation rules). akwizgran 2011-11-28 17:34:50 +00:00
  • b773660bca Advertise the Bluetooth address if the device is discoverable in either GIAC or LIAC mode. akwizgran 2011-11-28 15:51:48 +00:00
  • e23f646181 Cache the return value of Arrays.hashCode(). akwizgran 2011-11-28 15:44:19 +00:00
  • b72a90be21 String caches its hash code, so prefer HashMap to TreeMap. akwizgran 2011-11-28 15:40:16 +00:00
  • ebd6ebf902 Made TransportConfig and TransportProperties thread-safe. akwizgran 2011-11-28 15:36:36 +00:00
  • a348ff9091 Return immutable collections from the database. akwizgran 2011-11-28 15:29:53 +00:00
  • 40109000ad Use CountDownLatch rather than wait/notify. akwizgran 2011-11-28 15:22:29 +00:00
  • 26c7f1bd80 Use CopyOnWriteArrayList for listener lists. akwizgran 2011-11-28 15:12:13 +00:00
  • c9a43ad4bd Fixed a test. akwizgran 2011-11-24 22:17:02 +00:00
  • aefa7798e1 One more unit test for the road... akwizgran 2011-11-24 22:12:05 +00:00
  • 9345b5c71b Avoid DB lookups where possible. akwizgran 2011-11-24 22:09:04 +00:00
  • ff8010a945 Merge branch 'refs/heads/master' of ssh://akwizgran@briar.git.sourceforge.net/gitroot/briar/prototype akwizgran 2011-11-24 14:59:04 +00:00
  • 8068fa0d38 Don't keep connection windows in memory. akwizgran 2011-11-24 13:56:58 +00:00
  • 98148085b6 Don't lock the list of listeners while calling them. akwizgran 2011-11-23 12:13:51 +00:00
  • 214b274ee5 Removable drive monitor for OS X 10.4 (JNotify requires at least 10.5). akwizgran 2011-11-19 18:09:10 +00:00
  • b2226067e1 Don't start shutdown hook threads more than once. akwizgran 2011-11-19 17:23:18 +00:00
  • bc7d882af6 Upgraded H2 jar (the new version was built on OS X 10.4 for Java 1.5 compatibility). akwizgran 2011-11-19 17:05:10 +00:00
  • 8d74a02ad9 Added comments to WindowsShutdownManagerImpl. akwizgran 2011-11-19 16:49:04 +01:00
  • bb4c79322e Added WindowsShutdownManagerImplTest to ant buildfile. akwizgran 2011-11-19 16:42:39 +01:00
  • 3dc8a590c7 Use a native window to catch shutdown events. akwizgran 2011-11-19 15:45:23 +01:00
  • 046becd388 Shutdown manager (untested on Windows). akwizgran 2011-11-18 17:13:55 +00:00
  • 859ece6328 Erase connection windows before discarding them. akwizgran 2011-11-18 15:25:30 +00:00
  • a349a3f1ea Fixed the locking in ConnectionRecogniserImpl. Again. akwizgran 2011-11-18 14:16:51 +00:00
  • dacaa4566d Minor protocol refactoring. akwizgran 2011-11-18 11:27:34 +00:00
  • 30580f71ec Made erasable keys thread-safe. akwizgran 2011-11-18 11:05:07 +00:00
  • 6fada9f243 Finer-grained locking in the connection recogniser. akwizgran 2011-11-17 20:06:19 +00:00
  • 2b45cf0dd1 Accept connections asynchronously. akwizgran 2011-11-17 18:59:34 +00:00
  • 27a3f6e497 Erase known copies of keys (unit tests ensure we don't end up using zeroed keys). akwizgran 2011-11-17 09:54:24 +00:00
  • 66d973bcdd Ignore expected IVs that arrive by the wrong transport. akwizgran 2011-11-17 09:24:28 +00:00
  • 13ebd369e2 The KDF was using CTR mode unsafely. akwizgran 2011-11-17 09:01:59 +00:00
  • a144884ecd Erase connection windows if the JVM shuts down cleanly. akwizgran 2011-11-16 18:41:40 +00:00
  • 031aa53dc7 Minor SQL cleanups. akwizgran 2011-11-16 18:28:34 +00:00
  • 4da7a685cd Minor code cleanups. akwizgran 2011-11-16 18:15:32 +00:00
  • 01dd658200 Keep the connection windows in memory. akwizgran 2011-11-16 17:57:56 +00:00
  • f10512d787 Erase keys after using them. (Copies created by ciphers, etc, may still exist.) akwizgran 2011-11-16 16:22:35 +00:00
  • ece03038f4 Unit test for key derivation. akwizgran 2011-11-16 15:56:54 +00:00
  • a13a1769e5 Unit test for key derivation. akwizgran 2011-11-16 15:54:17 +00:00
  • f6ae4734ce Forward secrecy. akwizgran 2011-11-16 15:35:16 +00:00
  • d02a68edfc Return a connection context for outgoing connections (the secret will be included in this context in the near future). akwizgran 2011-11-15 17:47:30 +00:00
  • fabdaf5957 Remove transport ID from connection context. akwizgran 2011-11-15 17:32:31 +00:00
  • 9220bb3426 Key derivation function based on NIST SP 800-108. akwizgran 2011-11-15 17:19:11 +00:00
  • 6a15c03e81 Store the incoming and outgoing secrets separately. akwizgran 2011-11-15 16:07:14 +00:00
  • f41d48eb9f Made secret keys erasable from memory. akwizgran 2011-11-15 14:43:06 +00:00
  • 23be7fd876 Removed double-encryption of shared secrets. akwizgran 2011-11-15 14:09:28 +00:00
  • 6cdf68d6cb Initialise all connection windows when a contact is added. akwizgran 2011-11-15 13:45:57 +00:00
  • df054b1743 Store each connection window slot as a database row. akwizgran 2011-11-15 13:08:20 +00:00
  • cf49a28c95 Replaced SHA-256 with SHAd-256 to prevent length extension attacks. akwizgran 2011-11-15 11:11:31 +00:00
  • effa5c9d8e Throw checked exception if concurrent attempts are made to remove a contact. akwizgran 2011-11-15 09:51:51 +00:00
  • 6fd8493d3d Singleton lists and singleton sets aren't equal, so use lists consistently. akwizgran 2011-11-15 09:42:21 +00:00
  • 0da94879ef Use aliases for shorter, clearer SQL. akwizgran 2011-11-15 09:35:07 +00:00
  • 2ad15518a5 Return transports that have no properties. akwizgran 2011-11-15 09:00:51 +00:00
  • 72be34768b Minor refactoring. akwizgran 2011-11-14 22:14:52 +00:00
  • 73aa7d14d7 Split transport identifiers into two: TransportId (globally unique) and TransportIndex (locally unique). akwizgran 2011-11-14 21:40:05 +00:00
  • 7d09102c4d Advertise the Bluetooth address if the device is discoverable. akwizgran 2011-11-08 21:12:08 +00:00