Commit Graph

45 Commits

Author SHA1 Message Date
Sarah Jamie Lewis 463ba297ce Removing extra25519 dependency (original was purged)
the build was successful Details
2020-04-20 10:47:53 -07:00
Dan Ballard 03b9ff1fe8 move log and conectivity packages to standalone versions
the build was successful Details
2020-02-10 14:30:32 -05:00
Sarah Jamie Lewis 5a1fc1b94d Fixing Race Conditions
the build was successful Details
2019-11-07 16:21:15 -08:00
Sarah Jamie Lewis a96f682e77 Start using the derived ephemeral session key for encrypting 2019-01-23 11:31:44 -08:00
Sarah Jamie Lewis b05567fd81 Fixing Linting, Vetting & Formatting Issues 2019-01-09 15:02:09 -08:00
Sarah Jamie Lewis d54ed0b106 Adding IsValidHostname function 2018-11-21 14:07:13 -08:00
Dan Ballard 8fc60a0495 Mirating from bulb/asaur to bine, adding a generic Mixnet interface 2018-11-20 09:14:14 -08:00
erinn 8960be643c bugfix: the uncached connection attempt wasnt being returned 2018-10-09 19:24:22 -07:00
Dan Ballard 29e3a42cc9 asaur-ificate package and imports 2018-10-09 16:03:20 -07:00
erinn e825e52a7c check current onion descriptors on old versions of tor to see if they're out-of-sync 2018-10-09 12:55:42 -07:00
erinn fb8c0cac27 tidying up code paths and making detport selection a little better 2018-10-09 10:14:28 -07:00
erinn fd01dca056 forking bulb 2018-10-08 18:48:37 -07:00
erinn aa7b398646 bugfix: actually attempt to connect again after a failed first attempt 2018-10-08 09:44:52 -07:00
erinn a6ca1571ad gofmt 2018-10-07 19:43:55 -07:00
erinn 06381579e5 after failing a new connection, flush the onion descriptor cache and try again in case the destination has cycled since its last use 2018-10-07 19:31:32 -07:00
Sarah Jamie Lewis 5066380655 v3 onions 2018-10-05 13:06:54 -07:00
Sarah Jamie Lewis e382c8eb69 Rename 2018-06-08 15:05:22 -07:00
Sarah Jamie Lewis 6f9718596d fmt and travis update 2018-05-09 12:40:07 -07:00
Sarah Jamie Lewis 9980da3bd5 Fixing channelmanager race condition, deleting vendoring 2018-05-09 12:06:34 -07:00
Dan Ballard 3920d33a77 add util to get onion address from private key (#39)
* add util to get onion address from private key

* PR comments: added test, using go-ricochet errors, function argument a privateKey

* remove unnecesary cast and variable
2018-04-30 18:03:06 -07:00
Sarah Jamie Lewis 92b9a0eb1f Commenting 2018-01-17 13:18:46 -05:00
Sarah Jamie Lewis a04b3fe08b Moving ChannelResult processing to ControlChannel file and testing 2018-01-14 11:50:15 -05:00
Sarah Jamie Lewis 339995c101 Fixing gofmt 2018-01-12 13:04:20 -05:00
Sarah Jamie Lewis 4ccf95bee0 Adding RandNumber util to simplify chatchannel logic 2018-01-12 13:02:15 -05:00
Sarah Jamie Lewis 4b700d4223 More golint fixing in utils 2018-01-08 11:02:04 -08:00
Sarah Jamie Lewis 1a2fb40d91 Refactoring Application to remove channel handler duplications
Also simplfies application a lot, still not complete, but i like this approach much more
2018-01-07 16:51:46 -08:00
Sarah Jamie Lewis 05e8675ed5 Fixing a few golint issues 2018-01-05 14:16:52 -08:00
Sarah Jamie Lewis 617ca019f8 Adding stub tests for MessageBuilder 2018-01-04 15:32:37 -08:00
Sarah Jamie Lewis 43b357fdb6 First cut of minimizing private_key exposure in the code base
Minor formatting
2017-12-05 11:00:04 -08:00
Sarah Jamie Lewis e1031861a2 Adding basic tests for crypto_utils 2017-11-04 13:31:37 -07:00
Sarah Jamie Lewis 5057dd68ee Formatting + Checking Connection Error in Echobot 2017-11-02 16:45:27 -07:00
Sarah Jamie Lewis 8fe7b84fc9 Merge branch 'fix/chatchannel-api' of https://github.com/special/go-ricochet-protocol into special-fix/chatchannel-api 2017-11-02 15:45:09 -07:00
John Brooks e459a56286 Prevent deadlocks with Do or Break and closing connections
After the last round of fixes in Do, there was still one major issue
making it impossible to use Do or Break safely: closing connections.

Connections can be closed spontaneously, and this causes Process to
return. At that moment any ongoing call to Do or Break has deadlocked;
nothing will ever read those channels again. To prevent this, we have to
ensure that Do or Break won't try to send to Process' channels once it
has stopped reading from them. Doing that without other races is tricky.

The solution here, briefly, is to acquire a mutex in Do and Break before
checking the `closed` boolean, and hold that mutex for the entire
operation (including any blocking channel operations). When Process is
closing down the connection, it uses a separate goroutine to acquire the
same mutex and change the boolean, while still handling channel reads.
Once the boolean has changed, the mutex guarantees that nothing will try
to send to these channels again.

I've tried to document the problems and solutions in the code, because
it is subtle in some places and this is definitely critical code.
2017-11-02 15:41:34 -07:00
John Brooks a62d1bbcc9 Improve ChatChannel API for message acknowledgement
ChatChannel didn't return the message ID for sent messages, which made
using the returned ACKs impossible. The SendMessage method now returns
the uin32 messageID.

Also, SendMessage didn't support the TimeDelta field for messages, which
is used for queued or resent messages. This is now available as
SendMessageWithTime.

And finally, the ChatMessageAck callback didn't indicate if mesasges
were accepted or not, which is part of the protocol. That was added as a
field, which is unfortunately a breaking API change, but I've made
enough of those lately to not feel guilty about it.
2017-09-25 13:04:21 -07:00
Dan Ballard 5937ceee73 Add more crypto/utils and extend SetupOnion to support unix sockets 2017-08-14 08:43:33 -07:00
Sarah Jamie Lewis 22cbf5d738 First Cut of Applications + Bugs, Formatting 2017-07-04 11:29:11 -07:00
Sarah Jamie Lewis 1cf7c2b7c7 Adding a Trace log to Connection and removing all other logging directives 2017-06-27 12:48:35 -07:00
Sarah Jamie Lewis f4ed1c244b Adding Inbound Version Negotiation
+ Error handling for missing private key setting
2017-06-27 10:39:33 -07:00
Sarah Jamie Lewis 5d767174b1 Brand new API v0.2 2017-05-02 16:33:51 -07:00
Sarah Jamie Lewis 9d6592e1e4 Fixing up some comments 2016-11-08 15:05:05 -08:00
Sarah Jamie Lewis c37f9008b6 gofmt simplify 2016-11-08 14:55:17 -08:00
Wladimir J. van der Laan 5e3e873a16 networkresolver: fix gofmt output 2016-11-03 17:35:10 +01:00
Sarah Jamie Lewis 0de7b76cbc Replacing proxy dependency with golang.org/x/net/proxy 2016-10-02 17:49:12 -07:00
John Brooks 47ba383334 Improve packet-layer buffering and parsing logic
SendRicochetPacket now has error handling, correctly encodes channel
ids, accepts any io.Writer, and ensures that all data is written. All
callers should be changed at some point to handle errors also.

RecvRicochetPackets is refactored to return only one packet per call and
avoid reading more data than it will consume, which simplifies the logic
and fixes a number of problems with short reads or large packets. Also
fixed an error in bounds checking that caused a remote panic for invalid
packet sizes. It also now accepts any io.Reader.

Tests are updated and expanded, and now pass.

Changes to Ricochet.processConnection are whitespace-only, because of
the removal of the inner packets loop.
2016-10-02 17:49:12 -07:00
Sarah Jamie Lewis bfe5b74364 Refactor GoRicochet
* New Service Interface
* Server functionality
* 90% Code Coverage
* Regression Testing of Protocol Compliance
2016-07-02 18:52:28 -07:00