Commit Graph

30 Commits

Author SHA1 Message Date
Sarah Jamie Lewis 7a4350f0c1 Delete last reminants of V2 Onion Handling 2019-01-23 11:55:42 -08:00
Sarah Jamie Lewis 64ce11d436 Cleaning up and documenting examples 2019-01-23 11:38:54 -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
Dan Ballard 2815e29704 adding new filterable logging system 2018-12-03 11:59:21 -08:00
Dan Ballard 5697a1c03d torProvider now gracefuly handles tor process fails 2018-11-26 12:51:08 -08:00
Sarah Jamie Lewis 69e6644eb2 Fixing 3DH Auth Tests 2018-11-20 11:35:15 -08:00
Dan Ballard 8fc60a0495 Mirating from bulb/asaur to bine, adding a generic Mixnet interface 2018-11-20 09:14:14 -08:00
Dan Ballard 3900552e06 testing script fail on fail; fix chatchannel test - update for 3dh 2018-11-09 15:47:21 -08:00
erinn ad9d0efb02 updating chatchannels and echobot to use v3 2018-10-25 19:20:58 -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
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
Dan Ballard 5a94afa0f7 add application integration test: (#42)
- start two peers alice, bob
- make alice requests contact with bob
- they send messages
- they shutdown
- verify (and fix) no threads leaked
- verify messages
- add inbound connection handler to chatChannelHandler
- add Open and AcceptAllContactHandler to application
2018-05-30 10:51:40 -07:00
Sarah Jamie Lewis f9209e187c Testing ContactChannel, Fixing CloseChannel Conditions 2018-01-14 12:16:14 -05:00
Sarah Jamie Lewis cf46554922 Ensuring Channels Properly Close Themselves 2018-01-13 15:57:37 -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 f6cc472c6e Removing Erroneous SendMessage & Adding SupportChannelTypes Test 2018-01-04 15:51:32 -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 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 9a65aeed77 Improve ContactRequestChannel's API
After the RequestOpenChannel changes, it's now possible to specify the
name and message of an outbound request as variables of the channel handler,
instead implementing an interface method to return them.

Also added the SendResponse method, which is necessary to respond to an
inbound request that was in the Pending state.
2017-11-02 15:43:07 -07:00
John Brooks d19102b257 Pass channel handler directly to RequestOpenChannel
RequestOpenChannel is the primary API to open a new outbound channel. It
was written to take a connection.Handler and use OnOpenChannelRequest
to get a channels.Handler to represent the new channel, which is the
same path that inbound channels will take.

Going through the global OnOpenChannelRequest method makes this much
less flexible and prevents passing parameters to the new channel handler
during creation.  This also requires users of the API to know/find the
connection handler, or worse, to boilerplate one into existence for their
channel creation.

Instead, I think this function should take a channels.Handler directly,
so that the caller gets full control over the handler for their new
channel.

As part of that change, I've also moved the authentication logic in
AutoConnectionHandler to be contained entirely within
{In,Out}boundConnectionHandler.
2017-11-02 15:40:02 -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
John Brooks ea788d58ef Don't use pointers to interfaces
There are few situations where a pointer to an interface is useful in
Go, and this isn't one. Interfaces can hold types by value or pointer,
so long as that type fulfills the interface.
2017-09-23 16:44:12 -06: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
Dan Ballard d895b46a03 fix typo 2017-06-10 16:19:56 -07:00
Sarah Jamie Lewis 5d767174b1 Brand new API v0.2 2017-05-02 16:33:51 -07:00