]>
git.deb.at Git - rhonda/impostor.hazel.git/log
js6pak [Sun, 18 Dec 2022 20:27:59 +0000 (21:27 +0100)]
Hardcode nuget source
js6pak [Sun, 18 Dec 2022 18:43:40 +0000 (19:43 +0100)]
Add CI
js6pak [Sun, 18 Dec 2022 13:59:22 +0000 (14:59 +0100)]
Get rid of the dependency on Impostor.Api
js6pak [Sun, 18 Dec 2022 13:50:08 +0000 (14:50 +0100)]
Upgrade to .net7.0
js6pak [Wed, 10 Nov 2021 13:57:11 +0000 (14:57 +0100)]
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# Hazel.UnitTests/ThreadLimitedUdpConnectionTests.cs
# Hazel.UnitTests/UnityUdpConnectionTests.cs
# Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs
# Hazel/Hazel.csproj
# README.md
Forest [Wed, 25 Aug 2021 19:41:32 +0000 (12:41 -0700)]
Interestingly, SelectRead doesn't always return when you shut down, so some platforms will hang while disposing ThreadLimitedListeners. Fixed by polling for 1s, seems fine.
Forest [Fri, 30 Jul 2021 21:54:06 +0000 (14:54 -0700)]
Merge pull request #24 from willardf/custom_aes
Allow user to customize AES implementation
Matthew Endsley [Fri, 30 Jul 2021 05:23:14 +0000 (22:23 -0700)]
Allow the default AES implementation to be overridden
Forest [Fri, 30 Jul 2021 05:23:24 +0000 (22:23 -0700)]
Update README.md
Forest [Wed, 7 Jul 2021 05:16:38 +0000 (22:16 -0700)]
Fix a couple of flaky tests that didn't match usage expectations
js6pak [Mon, 5 Jul 2021 00:19:28 +0000 (02:19 +0200)]
Merge remote-tracking branch 'upstream/master'
Forest [Wed, 30 Jun 2021 03:11:45 +0000 (20:11 -0700)]
Add long/ulong support
Forest [Tue, 15 Jun 2021 23:50:47 +0000 (16:50 -0700)]
Merge pull request #22 from willardf/Add-insert-message-to-message-reader
Added InsertMessage function to MessageReader
Jess Cloutier [Fri, 11 Jun 2021 17:00:32 +0000 (13:00 -0400)]
Added test case that continues reading without resetting, also has multiple inserts at different levels
Jess Cloutier [Wed, 9 Jun 2021 18:48:32 +0000 (14:48 -0400)]
Added unit tests for `InsertMessage()` and fixed some issues brought to light by the tests
Forest [Tue, 8 Jun 2021 21:47:31 +0000 (14:47 -0700)]
Merge pull request #21 from willardf/fix-bounds-checks
Fix some bounds checking while parsing ClientHellos
Forest [Tue, 8 Jun 2021 01:42:29 +0000 (18:42 -0700)]
Add test for one of the bounds checks fixed
Forest [Tue, 8 Jun 2021 00:05:03 +0000 (17:05 -0700)]
Fix some bounds checking while parsing ClientHellos and improve or disable some flaky tests
Jess Cloutier [Mon, 7 Jun 2021 17:57:47 +0000 (13:57 -0400)]
Added InsertMessage function to MessageReader
Forest [Wed, 14 Apr 2021 04:36:43 +0000 (21:36 -0700)]
Merge pull request #20 from willardf/sha256_stream
Stream data blocks directly to SHA256
Matthew Endsley [Wed, 14 Apr 2021 00:21:27 +0000 (17:21 -0700)]
Stream data blocks directly to SHA256
This removes the need to buffer all data in a MemoryStream to simply
hash it when required.
Matthew Endsley [Mon, 12 Apr 2021 20:08:20 +0000 (13:08 -0700)]
Add Sha256Stream
This commit simply moves the MemoryStream/SHA256 combination into a
dedicated class and adds unit tests for SHA256 from the original FIPS
publication [1]
[1] https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/documents/fips180-2withchangenotice.pdf
js6pak [Fri, 2 Apr 2021 18:31:03 +0000 (20:31 +0200)]
Remove tests (for now at least)
js6pak [Fri, 2 Apr 2021 18:28:06 +0000 (20:28 +0200)]
Bring back async changes
js6pak [Wed, 31 Mar 2021 11:39:15 +0000 (13:39 +0200)]
Fix warnings
js6pak [Wed, 31 Mar 2021 11:39:00 +0000 (13:39 +0200)]
Change root namespace to Impostor.Hazel
js6pak [Wed, 31 Mar 2021 11:37:54 +0000 (13:37 +0200)]
Fix tests on linux
js6pak [Wed, 31 Mar 2021 11:37:49 +0000 (13:37 +0200)]
Migrate to new csproj format
Forest [Fri, 2 Apr 2021 17:54:22 +0000 (10:54 -0700)]
Merge pull request #18 from willardf/fix_resent_handshake_failure
Fix resent handshake failure
Matthew Endsley [Fri, 2 Apr 2021 01:10:37 +0000 (18:10 -0700)]
Do not generate ClientRandom on ClientHello resend
This buffer should only be generated at the start of the session.
Re-generating it on resend of ClientHello will desynchronize the session
between the client and server, resulting in the server refusing the
client's connection due to a hash mismatch in the Finished handshake
message.
Matthew Endsley [Fri, 2 Apr 2021 00:31:10 +0000 (17:31 -0700)]
Add unit test illustrating a connection failure due to resent handshake records
Matthew Endsley [Fri, 2 Apr 2021 00:30:12 +0000 (17:30 -0700)]
Add SocketCaputre to UnitTest project
This allows a unit test to explicitly control packet flow. This is
useful for scenarios that require specific timing and interleaving of
packets.
Forest [Thu, 1 Apr 2021 20:27:34 +0000 (13:27 -0700)]
Add a verbose mode to logging, place some of the noisiest DTLS logs in verbose
Forest [Wed, 31 Mar 2021 21:06:34 +0000 (14:06 -0700)]
Merge pull request #16 from willardf/verbose_bytespan_error
Add additional context for invalid ByteSpans
Forest [Wed, 31 Mar 2021 20:22:47 +0000 (13:22 -0700)]
Merge pull request #17 from willardf/drop_bad_gcm_records
Drop bad gcm records
Matthew Endsley [Wed, 31 Mar 2021 19:16:11 +0000 (12:16 -0700)]
Add unit test to confirm malformed GCM record bug
Matthew Endsley [Wed, 31 Mar 2021 19:02:49 +0000 (12:02 -0700)]
Drop records that are too small to be decrypted
Matthew Endsley [Wed, 31 Mar 2021 18:56:47 +0000 (11:56 -0700)]
Add additional context for invalid ByteSpans
Forest [Tue, 30 Mar 2021 07:21:53 +0000 (00:21 -0700)]
Fix a very strange issue around the socket on message read callback potentially being called twice
Forest [Mon, 22 Mar 2021 23:48:35 +0000 (16:48 -0700)]
Fix a test that broke based on the incorrect assumption that a first message id could be 1 instead of 0
Forest [Mon, 22 Mar 2021 23:32:52 +0000 (16:32 -0700)]
Fix an off-by-one bug when receiving out of order messages that wrap the last received id past ushort.MaxValue
Forest [Thu, 18 Mar 2021 01:44:56 +0000 (18:44 -0700)]
Reimplement debug lag features for UnityClientConnection
Forest [Wed, 17 Mar 2021 05:53:55 +0000 (22:53 -0700)]
Merge pull request #13 from willardf/dtls_cleanup_handshake_timeout
Remove DTLS peers that fail to negotiate a valid epoch
Forest [Sat, 6 Mar 2021 02:55:52 +0000 (18:55 -0800)]
Merge pull request #8 from Elsensee/fix-ack-unreceived-packets
Don't ack unreceived packets
Matthew Endsley [Sat, 6 Mar 2021 01:53:23 +0000 (17:53 -0800)]
Remove DTLS peers that fail to negotiate a valid epoch
Forest [Fri, 5 Mar 2021 23:17:07 +0000 (15:17 -0800)]
Merge pull request #11 from willardf/synchronous_disconnect
Ensure Unity clients send a Disconnect packet when disposed
Matthew Endsley [Fri, 5 Mar 2021 22:09:07 +0000 (14:09 -0800)]
Add a synchronous WriteBytesToConnection to handle disconnect packets
Matthew Endsley [Sun, 28 Feb 2021 23:48:25 +0000 (15:48 -0800)]
Ensure Unity clients send a Disconnect packet when disposed
Matthew Endsley [Tue, 9 Feb 2021 18:36:57 +0000 (10:36 -0800)]
Merge pull request #10 from willardf/dtls
Add DTLS Support
Matthew Endsley [Tue, 9 Feb 2021 18:34:37 +0000 (10:34 -0800)]
Merge branch 'dtls_listener_shutdown' into dtls_development
Matthew Endsley [Thu, 4 Feb 2021 21:54:15 +0000 (13:54 -0800)]
Flush outgoing packets before shutting closing socket
This ensures we at least attempt to send out Disconnect packets to
connected clients when shutting down. Prior to this the send thread
would race the Dispose thread causing indeterminate behavior. Sometimes
disconnect packets would be sent out, sometimes they wouldn't.
Matthew Endsley [Thu, 4 Feb 2021 21:52:00 +0000 (13:52 -0800)]
Add prefix string to TestLogger
Matthew Endsley [Wed, 3 Feb 2021 22:49:12 +0000 (14:49 -0800)]
Encode each certificate size in Certficate message
Matthew Endsley [Wed, 3 Feb 2021 22:14:14 +0000 (14:14 -0800)]
Include hash+signature algorithms in ServerKeyExchange
Matthew Endsley [Wed, 3 Feb 2021 21:44:02 +0000 (13:44 -0800)]
Update ClientHello to encode extensions size
Matthew Endsley [Wed, 3 Feb 2021 21:41:20 +0000 (13:41 -0800)]
Merge branch 'dtls_rotate_hmac' into dtls_development
Matthew Endsley [Wed, 3 Feb 2021 21:20:52 +0000 (13:20 -0800)]
Periodically rotate DTLS HMAC keys
Matthew Endsley [Wed, 3 Feb 2021 20:34:20 +0000 (12:34 -0800)]
ChangeChiperSpec records should have a single byte
Matthew Endsley [Wed, 3 Feb 2021 21:23:33 +0000 (13:23 -0800)]
Do not compute HMAC for zero-length cookies
This is a common case since all clients send a non-signed ClientHello
message to initiate a new session. There is no need to perform the
hash+hmac for signatures that will always fail verification due to a
mismatched size.
Matthew Endsley [Wed, 3 Feb 2021 11:38:34 +0000 (03:38 -0800)]
Acquire lock when resending DTLS packets
Matthew Endsley [Wed, 3 Feb 2021 11:24:54 +0000 (03:24 -0800)]
Merge branch 'dtls_all_tests' into dtls
Matthew Endsley [Wed, 3 Feb 2021 11:23:49 +0000 (03:23 -0800)]
Use TestLogger for ThreadLimitedUdp tests
Matthew Endsley [Wed, 3 Feb 2021 11:18:56 +0000 (03:18 -0800)]
Modify ConnectLikeAJerk to cap valid connections at 1
DTLS listeners will reject all raw traffic spam
Matthew Endsley [Wed, 3 Feb 2021 11:10:41 +0000 (03:10 -0800)]
Leverage existing tests for DTLS listener
Matthew Endsley [Wed, 3 Feb 2021 11:03:38 +0000 (03:03 -0800)]
Delegate listener and connection creation to subclass
Matthew Endsley [Wed, 3 Feb 2021 11:01:42 +0000 (03:01 -0800)]
Move test bodies to base class
Matthew Endsley [Wed, 3 Feb 2021 10:57:41 +0000 (02:57 -0800)]
Merge branch 'fix_ipv6' into dtls
Matthew Endsley [Wed, 3 Feb 2021 10:02:12 +0000 (02:02 -0800)]
Modify ConnectionId to key on both an endpoint and serial
Matthew Endsley [Wed, 3 Feb 2021 10:17:22 +0000 (02:17 -0800)]
Remove NetworkConnection.RemoteEndPoint
This field was originally created to provide a non-generic alternative
to the Connection class' EndPoint field. However, we've replaced the
generic ConnectionEndPoint with IPEndPoint in the Connection class.
Since the bas class has a less-generic alias, it is now safe to remove
RemoteEndPoint from NetworkConnection in favor of always using
Connection.EndPoint
Matthew Endsley [Wed, 3 Feb 2021 10:11:28 +0000 (02:11 -0800)]
Use IPEndPoint internally in ThreadLimitedUdpConnectionListener
Matthew Endsley [Wed, 3 Feb 2021 09:18:14 +0000 (01:18 -0800)]
Update error message to reflect new function source
Matthew Endsley [Wed, 3 Feb 2021 09:53:23 +0000 (01:53 -0800)]
Use ConnectionId as key to connection map
Matthew Endsley [Wed, 3 Feb 2021 09:15:10 +0000 (01:15 -0800)]
Use consuming enumerator for queue processing
This changes avoids us needing to write the proper error-checking code
to see if a queue has been completed vs some unrelated failure.
Matthew Endsley [Wed, 3 Feb 2021 09:14:36 +0000 (01:14 -0800)]
Initialize the keep-alive timer before sending packets
Matthew Endsley [Wed, 3 Feb 2021 09:14:05 +0000 (01:14 -0800)]
Ensure disconnect message is encrypted with DTLS
Matthew Endsley [Wed, 3 Feb 2021 08:22:14 +0000 (00:22 -0800)]
Attempt to resend reliable packets during connection loop
Matthew Endsley [Wed, 3 Feb 2021 22:27:33 +0000 (14:27 -0800)]
Fix outgoing sequence numbers from DTLS connection listener
Matthew Endsley [Tue, 2 Feb 2021 14:17:23 +0000 (06:17 -0800)]
Add DTLS connection tests
Matthew Endsley [Tue, 2 Feb 2021 15:07:52 +0000 (07:07 -0800)]
Only join threads if we were active
Matthew Endsley [Tue, 2 Feb 2021 15:06:35 +0000 (07:06 -0800)]
Do not clear spans of zero length
Matthew Endsley [Tue, 2 Feb 2021 14:17:05 +0000 (06:17 -0800)]
Merge branch 'dtls_client' into dtls
Matthew Endsley [Mon, 1 Feb 2021 23:35:28 +0000 (15:35 -0800)]
Implement client-side DTLS handshake
Matthew Endsley [Mon, 1 Feb 2021 21:53:52 +0000 (13:53 -0800)]
Add stub DTLS client connection
Matthew Endsley [Sun, 24 Jan 2021 18:06:49 +0000 (10:06 -0800)]
Merge branch 'dtls_listener' into dtls
Matthew Endsley [Tue, 12 Jan 2021 15:10:12 +0000 (07:10 -0800)]
Implement server-side DTLS handshake
Matthew Endsley [Thu, 17 Dec 2020 18:25:22 +0000 (10:25 -0800)]
Add stub DTLS listener
Matthew Endsley [Sun, 24 Jan 2021 17:24:04 +0000 (09:24 -0800)]
Allow subclasses to mark a connection as stale
These connections will be disconnected at the next call to DisconnectOldConnections
Matthew Endsley [Sun, 24 Jan 2021 17:30:35 +0000 (09:30 -0800)]
Use abstract connection identifier
This change lays the groundwork for the
ThreadLimitedUdpConnectionListener to distinguish different logical
sessions from the same remote address.
Matthew Endsley [Fri, 22 Jan 2021 18:39:08 +0000 (10:39 -0800)]
Add null record protection implementation
Matthew Endsley [Wed, 13 Jan 2021 18:32:09 +0000 (10:32 -0800)]
Merge branch 'dtls_listener_update' into dtls
Matthew Endsley [Thu, 17 Dec 2020 18:00:50 +0000 (10:00 -0800)]
Allow TL connection listener to override incoming message processing
Matthew Endsley [Wed, 13 Jan 2021 12:25:01 +0000 (04:25 -0800)]
Merge branch 'dtls_record_protection' into dtls
Matthew Endsley [Sat, 19 Dec 2020 01:19:38 +0000 (17:19 -0800)]
Update SendMessageInfo to hold byte span
Matthew Endsley [Wed, 13 Jan 2021 07:58:16 +0000 (23:58 -0800)]
Add AesGcm record protection
Matthew Endsley [Tue, 12 Jan 2021 15:14:53 +0000 (07:14 -0800)]
Allow derived listener classes access to the logger
Matthew Endsley [Wed, 13 Jan 2021 09:35:12 +0000 (01:35 -0800)]
Merge branch 'dtls_record' into dtls
Matthew Endsley [Wed, 13 Jan 2021 18:37:06 +0000 (10:37 -0800)]
Add interface for record protection
Matthew Endsley [Wed, 13 Jan 2021 08:56:28 +0000 (00:56 -0800)]
Merge branch 'dtls_psuedo_random_function' into dtls
Matthew Endsley [Wed, 13 Jan 2021 09:30:55 +0000 (01:30 -0800)]
Add record wire format conversions
Matthew Endsley [Wed, 13 Jan 2021 08:41:11 +0000 (00:41 -0800)]
Add common PRF labels as constants