Nick Mathewson
3bcd647263
tor-cert: comment out cert-generation code
...
This won't be used until we have onion service or relay support.
2020-09-28 16:19:23 -04:00
Nick Mathewson
98ab84e774
Rename remaining get_ accessors
2020-09-28 16:13:14 -04:00
Nick Mathewson
9b276e6a5a
tor_cert: rename accessors
2020-09-28 16:01:33 -04:00
Nick Mathewson
22c84aeaf6
Tests for CircTarget::linkspecs()
2020-09-28 15:53:23 -04:00
Nick Mathewson
05da5a7f73
Rename some identifiers in tor-linkspec.
...
By convention, rust accessor functions don't start with 'get'.
2020-09-28 15:29:39 -04:00
Nick Mathewson
3b3a6736f6
Rename ExtendTarget to CircTarget.
2020-09-28 15:22:24 -04:00
Nick Mathewson
079b38a609
Rewrite the TODO file.
2020-09-28 15:04:25 -04:00
Nick Mathewson
190d9e38f2
Tests for tor-cert
2020-09-28 12:02:32 -04:00
Nick Mathewson
52016aa35b
A few more unit tests for tor-cell
2020-09-28 11:01:59 -04:00
Nick Mathewson
397d753e4e
Fix a few clippy issues
2020-09-27 03:30:09 -04:00
Nick Mathewson
2feb750ba1
fix fuzzing targets that broke from recent refactoring
2020-09-27 03:16:53 -04:00
Nick Mathewson
34fb048e25
Tests for relay cell encoding/decoding.
2020-09-27 02:17:37 -04:00
Nick Mathewson
4ea9bb6153
Tests for channel-cell codec
2020-09-27 01:37:28 -04:00
Nick Mathewson
eba1d796fb
Add tests for certs cell accessors
2020-09-27 00:46:52 -04:00
Nick Mathewson
13edb7b10e
Test a few more channel cell types.
2020-09-27 00:35:26 -04:00
Nick Mathewson
096f0d499f
test ipv6 connected cell
2020-09-27 00:09:42 -04:00
Nick Mathewson
31b8d95c2f
Tests for Unrecognized and Data relay messages
2020-09-27 00:01:55 -04:00
Nick Mathewson
7096a6b774
Add tests for END_REASON_EXITPOLICY messages.
2020-09-26 23:44:57 -04:00
Nick Mathewson
a0a3004a82
More tests for begin cells, plus fixes
2020-09-26 23:38:22 -04:00
Nick Mathewson
207a971cd2
add a spec conformance comment
2020-09-26 19:27:15 -04:00
Nick Mathewson
ad36e3acec
Fix some comments that reflected a misunderstanding in SENDMEs
...
I had thought that the sendme authentication things used for
onion services were 32-byte; they're still only 20.
2020-09-26 19:25:51 -04:00
Nick Mathewson
fa2fd4bbfe
Add tests for a few more relay message types
2020-09-26 19:22:18 -04:00
Nick Mathewson
3d5cd55669
Add test vectors for a few relay message types.
...
I generated these by running an instrumented version of Tor through
chutney.
2020-09-26 17:32:15 -04:00
Nick Mathewson
cb57d00161
Use the correct value for TAP_C_HANDSHAKE_LEN
2020-09-26 17:31:01 -04:00
Nick Mathewson
d74f5f11f5
tor-proto conformance: do not write zero-valued flags in begin cell.
2020-09-26 17:24:48 -04:00
Nick Mathewson
d3e4ca0ecb
tor-cell: Add some test vectors for channel messages
2020-09-26 16:23:57 -04:00
Nick Mathewson
a3143ab960
Run cargo upgrade.
2020-09-26 14:20:28 -04:00
Nick Mathewson
220a3acad2
update fuzzing cfg for tor-cell crate
2020-09-26 12:52:59 -04:00
Nick Mathewson
b710e5c770
Split the cell-handling parts of tor-proto into a new crate.
2020-09-26 12:49:03 -04:00
Nick Mathewson
404cec07e7
readme edits
2020-09-26 11:03:05 -04:00
Nick Mathewson
653de035bc
Make sendme authentication optional.
...
This code deviates from current tor in that it allows missing
sendme authentications only when we know we're talking to an old
relay, or when we don't know the version of the relay we're talking
to.
2020-09-25 19:20:32 -04:00
Nick Mathewson
adf5ef3f5c
Lower our "#[allow(dead_code)]" decl in tor_proto."
2020-09-25 18:57:21 -04:00
Nick Mathewson
aa0dc66fe3
Update TODO and README.
2020-09-25 18:49:23 -04:00
Nick Mathewson
343af46715
Improve documentation and lightly refactor SENDME code
2020-09-25 18:49:23 -04:00
Nick Mathewson
37aab00d12
Add new (disabled) demo pieces to client-demo
2020-09-25 18:49:23 -04:00
Nick Mathewson
ba1600371b
Implement authenticated sendme output for circuit-level sendmes.
...
This patch has a XXXXX kludge note in it.
2020-09-25 18:49:23 -04:00
Nick Mathewson
c0ee910413
Add a bad workaround for a deadlock: we should look for a better one.
2020-09-25 17:06:33 -04:00
Nick Mathewson
6071b0e903
Fix encoding/decoding of authenticated sendme.
2020-09-25 17:06:33 -04:00
Nick Mathewson
08cfb40350
Try to get sendme crypto working
...
There's a problem, though: this code assumes that tags are 20 bytes
long whereas actually the tag type is part of the crypto layer info.
So maybe in the long term we need to move the queue of tags from the
send window into being part of the crypto layers.
2020-09-25 17:06:33 -04:00
Nick Mathewson
bc4c05d6a7
Incomplete implementation of circuit SENDME handling.
...
This is incomplete because the cell crypto code doesn't actually
expose tags yet, and because it demands tags unconditionally,
without caring about the linkspec protocol version.
2020-09-25 17:06:33 -04:00
Nick Mathewson
06ede86f7f
Attempted implementation of stream sendme cells
2020-09-25 17:06:33 -04:00
Nick Mathewson
92463dc03e
Initial work on a sendme backend.
...
Parameterized for authenticated/unauthenticated operation, and
operation on circuits and streams.
2020-09-25 09:47:55 -04:00
Nick Mathewson
60ff67113f
Initial error cleanup on streams/circuits
2020-09-25 08:35:48 -04:00
Nick Mathewson
f945af0c41
Document private members in most crates
2020-09-24 19:25:37 -04:00
Nick Mathewson
18b13e8cae
Migrate ClientMain to byte-oriented API.
2020-09-24 18:56:54 -04:00
Nick Mathewson
50848b8fa0
Try to make a send/receive style API for streams.
2020-09-24 18:03:03 -04:00
Nick Mathewson
da3a8fdd50
Add support for RELAY_END cells.
...
This was a hard one. I need to make sure that we send an END cell
when the stream is dropped. But we can't call an .await from inside
the drop() function, since drop() isn't async, and we don't have an
executor.
Fortunately, you can call send() on a oneshot::Sender without having
to await on it, so that's the obvious thing to put in drop(). But
we need some way to make sure that the oneshot::Receiver is given to
the reactor, and is .awaited. For that, we needed a control
channel. And the reactor needs to treat the control channel and the
close messages as equally important.
So that's how I wound up with a
Fuse<Select<mpsc::Receiver<Result<Foo>>,
SelectAll<Once<oneshot::Receiver<Foo>>>>>.
I doubt that this is actually the best way to handle any of this!
2020-09-24 15:33:54 -04:00
Nick Mathewson
9e8350aea0
as Tor does, skip to random initial stream member.
2020-09-23 19:50:15 -04:00
Nick Mathewson
c35477bb3d
Fuse input streams on creation.
2020-09-23 19:21:49 -04:00
Nick Mathewson
6492334aff
Turn IdMap into an extension trait.
...
Also, use the "right" (cyclic, potentially expensive) algorithm for
stream IDs.
2020-09-23 17:53:58 -04:00