Nick Mathewson
618ed48cea
hsclient: Create a CircTarget from an IntroPointDesc.
...
The main body of this function is written so that we can later use
it to create a CircTarget from an INTRODUCE2 message.
2023-06-07 07:55:45 -04:00
Nick Mathewson
205b6d176c
netdir, netdoc: Add accessors for protocol version status.
...
The consensus includes a listing for clients and for relays,
saying which protocol versions are _required_ for participation on
the network, and which versions are _recommended_. We have been
parsing this, but not yet exposing it.
This commit adds accessors to expose it, since we'll need that in
order to create CircTargets for introduction points and rendezvous
points.
2023-06-06 09:06:01 -04:00
Ian Jackson
9a30d76ea6
hsdesc: Add minimal set of accessors for HsDesc and IntroPointDesc
2023-06-05 19:33:31 +01:00
Ian Jackson
8382927080
hsdesc docs: Don't imply that a thing has been done, which hasn't yet
2023-06-05 19:20:45 +01:00
Ian Jackson
fa324f76de
hsdesc docs: Use the definite article
...
These are (I hope) the only key matching the description. If they're
not, the description needs to be expanded.
2023-06-05 19:20:13 +01:00
Nick Mathewson
469f62a983
Remove semver.md files from 1.1.5
2023-06-01 14:08:24 -04:00
Ian Jackson
254d4c93a7
Merge branch 'bump-versions-v115' into 'main'
...
Bump crate versions in preparation for v1.1.5 release.
See merge request tpo/core/arti!1211
2023-06-01 17:32:41 +00:00
Nick Mathewson
daf5ecc153
Bump crate versions in preparation for v1.1.5 release.
...
Generated with the following commands:
```
cargo set-version --bump minor -p tor-cell
cargo set-version --bump minor -p tor-linkspec
cargo set-version --bump minor -p tor-proto
cargo set-version --bump minor -p tor-netdoc
cargo set-version --bump minor -p tor-circmgr
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-basic-utils
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-hscrypto
cargo set-version --bump patch -p tor-checkable
cargo set-version --bump patch -p tor-async-utils
cargo set-version --bump patch -p caret
cargo set-version --bump patch -p fs-mistrust
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p retry-error
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-events
cargo set-version --bump patch -p tor-units
cargo set-version --bump patch -p tor-rtcompat
cargo set-version --bump patch -p tor-rtmock
cargo set-version --bump patch -p tor-protover
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-socksproto
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-congestion
cargo set-version --bump patch -p tor-persist
cargo set-version --bump patch -p tor-chanmgr
cargo set-version --bump patch -p tor-ptmgr
cargo set-version --bump patch -p tor-guardmgr
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-hsclient
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p arti-rpcserver
cargo set-version --bump patch -p arti-config
cargo set-version --bump patch -p arti-hyper
cargo set-version --bump patch -p arti
cargo set-version --bump patch -p arti-bench
cargo set-version --bump patch -p arti-testing
```
2023-06-01 10:03:05 -04:00
Tor CI Release
3aef515135
fallbackdir: Update list generated on June 01, 2023
...
Signed-off-by: Tor CI Release <no-email@torproject.org>
2023-06-01 09:41:28 -04:00
Nick Mathewson
8d32e1f65f
Run fixup-features script and resolve its complaints.
2023-05-31 08:04:10 -04:00
Nick Mathewson
6703f3d52a
Merge branch 'stream_ctrl' into 'main'
...
Experimental new stream-ctrl feature
Closes #847
See merge request tpo/core/arti!1198
2023-05-24 20:01:40 +00:00
Nick Mathewson
e4758a754e
Add "TODO RPC" notes around DataStreamCtrl per review.
2023-05-24 15:25:33 -04:00
Nick Mathewson
a397ca77d9
proto: Add stream-status functionality to DataStreamCtrl.
...
There are some weaknesses and problems here; see TODO notes.
2023-05-24 15:25:33 -04:00
Ian Jackson
14b7fae113
Merge branch 'virtual_conditional' into 'main'
...
proto: Make PathEntry::Virtual feature-conditional.
See merge request tpo/core/arti!1201
2023-05-24 14:57:24 +00:00
Nick Mathewson
3d4b9aa1b7
Merge branch 'rpc-auth-and-meta' into 'main'
...
rpc: authentication and basic handle manipulation
See merge request tpo/core/arti!1200
2023-05-24 14:53:29 +00:00
Nick Mathewson
7178ab85eb
Merge branch 'real_generational_arena' into 'main'
...
rpc: Use the real generational-arena crate
See merge request tpo/core/arti!1203
2023-05-24 14:50:20 +00:00
Nick Mathewson
936387efee
rpc: Remove downgrade_owned for now
...
Rationale: Our weak-vs-strong design is a bit confused at the moment
due to concerns about deduplication and capability semantics. It's
not clear that a general "change strong to weak" method is
compatible with what we want to provide.
2023-05-24 10:15:56 -04:00
Nick Mathewson
4a9c6fba7d
rpc: Disable auth:get_rpc_protocol for now.
2023-05-24 10:15:56 -04:00
Nick Mathewson
9713e8d305
rpc: Implement functionality to remove objects from a session
...
I've made doing some design choices here:
* Reserving "rpc" as a prefix for post-authentication
functionality that is not arti-specific.
* Declaring these to be methods on the session rather than methods
on the objects themselves.
There's a problem with defining an API to drop a weak reference; see
comment in code.
2023-05-24 10:15:56 -04:00
Nick Mathewson
15a8644bf7
rpc: fix documentation for methods in Context.
2023-05-24 10:15:56 -04:00
Nick Mathewson
fef8342be3
rpc: Make the top-level returned object a "session".
...
This will make it easier to change the semantics of what exactly we
return, whether it has to be/contain a client, whether you can use
it to look up all the live objects, &etc.
2023-05-24 10:15:56 -04:00
Nick Mathewson
45b4845f3a
rpc: Remove fake_generational_arena
...
Now that generation-arena has merged [@diziet's patch] to clarify
their license, we no longer need to disable it.
[@diziet's patch]: https://github.com/fitzgen/generational-arena/pull/56
2023-05-23 13:58:08 -04:00
Nick Mathewson
24d67594d7
cell: Make EstablishRendezvous contain a RendCookie.
2023-05-23 13:33:07 -04:00
Nick Mathewson
278e2fea79
Merge branch 'socks-read-fix' into 'main'
...
Fix a local-only CPU DoS bug.
Closes #861
See merge request tpo/core/arti!1196
2023-05-23 15:28:00 +00:00
Nick Mathewson
03c81ae5aa
proto: Make PathEntry::Virtual feature-conditional.
...
This fixes a warning when building tor-proto without the
`rpc-common` feature.
2023-05-23 10:59:37 -04:00
Nick Mathewson
03cb91012d
Fix a local-only CPU DoS bug.
...
Previously, there was a bug in the way that our code used our SOCKS
implementations. If the buffer used for a SOCKS handshake became full
without completing the handshake, then rather than expanding the buffer
or closing the connection, our code would keep trying to read into the
zero-byte slice available in the full buffer forever, in a tight loop.
We're classifying this as a LOW-severity issue, since it is only
exploitable by pluggable transports (which are trusted) and by
local applications with access to the SOCKS port.
Closes #861 .
Fixes TROVE-2023-001.
Reported-By: Jakob Lell <jakob AT srlabs DOT de>
2023-05-23 10:48:27 -04:00
Nick Mathewson
0993672cb2
rpc: Implement auth:query.
2023-05-23 09:08:32 -04:00
Nick Mathewson
2798dade00
rpc: Implement the auth:get_rpc_protocol method.
2023-05-23 08:58:03 -04:00
Nick Mathewson
d745e2d866
rpc: move existing auth code to new module.
2023-05-23 08:46:19 -04:00
Ian Jackson
5ba7f31c1d
tor-hsclient: Mockable: Do concrete calls with UFCS
...
Method dispatch rules mean that if the receiver type of the actual
function changes, `self.call()` can turn into a purely-recursive call
which overflows the stack.
Async Rust doesn't have the usual warning for this situation :-(.
UFCS is clumsier but doesn't have that problem because it involves
much less magical dispatch. Instead of generating a recursive call
which overflows the stack, it fails to compile.
2023-05-23 12:47:33 +01:00
Ian Jackson
79b9a26df0
tor-hsclient: Fix MockableClientCirc for ClientCirc changes
...
ClientCirc::begin_dir_stream now takes Arc<Self>. Method resolution
rules mean that this code would just recurse, leading to a stack
overflow.
2023-05-23 12:47:33 +01:00
Nick Mathewson
0df0cf4250
proto: Create a `DataStreamCtrl` type.
...
The idea here is that we want to make DataStream visible to the
RPC system without requiring that the RPC session hold the
DataStream itself (or the Reader, or the Writer). We could solve
this problem by making _all_ the state in the DataStream shared,
but that would introduce unnecessary extra locking in our critical
path.
Instead we're creating the notion of a "control handle" that lets
you manage and observe a stream without actually owning the stream.
Right now the only supported functionality is asking for the
stream's circuit.
Part of #847
2023-05-22 11:27:44 -04:00
Ian Jackson
1fc1c269c3
Fix a docs reference to refer to HsClientIntroAuthKeypair
...
Fixes warning from
cargo -o doc --document-private-items --all-features --workspace
This was evidentlhy overlooked during recent replacement of unescorted
private keys in the code.
2023-05-22 14:30:16 +01:00
Nick Mathewson
0765412fc8
proto: Add a new experimental stream-ctrl feature.
...
(It doesn't do anything yet. It may eventually become always-on.
But for now let's make this API optional. Part of #847 )
2023-05-22 09:07:03 -04:00
Nick Mathewson
b55a3ade33
tor-proto: Move a comment in Cargo.toml
2023-05-22 09:04:44 -04:00
Nick Mathewson
9848155f59
Upgrade notify dependency to 6.0
2023-05-22 07:54:10 -04:00
Nick Mathewson
a179d10ad4
Upgrade async-compression dependency to 0.4.0.
2023-05-22 07:52:18 -04:00
Nick Mathewson
16c992ecd3
Upgrade memmap2 dependency to 0.6.1.
2023-05-22 07:51:22 -04:00
Nick Mathewson
512455da96
Upgrade serde_with dependency to 3.0.0
2023-05-22 07:49:58 -04:00
Nick Mathewson
df9ff46b80
tor-rtcompat: Say default-features with a dash, not an underscore.
...
(`cargo-upgrade` warns about this.)
2023-05-22 07:49:28 -04:00
Ian Jackson
26af92ca10
Merge branch 'clippy-nightly' into 'main'
...
Fix a few warnings from clippy nightly
See merge request tpo/core/arti!1193
2023-05-22 10:49:10 +00:00
Nick Mathewson
4b9d6b255e
Merge branch 'escorted_25519_secrets' into 'main'
...
Refactor code not to use unescorted ed25519 secrets
Closes #798
See merge request tpo/core/arti!1192
2023-05-18 18:48:05 +00:00
Nick Mathewson
9773633a84
hscrypto: Remove an incorrect comment.
...
(It said that we want to deprecate all unescorted secret keys; in
fact, only unescorted EdDSA secrets are bad.)
2023-05-18 14:18:53 -04:00
Nick Mathewson
82801d9963
netdoc, hsclient: Update remaining ed25519::SecretKey users
...
Fortunately, these are all in experimental code.
Closes #798
2023-05-18 14:18:53 -04:00
Nick Mathewson
66c06ecc9c
hscrypto: Replace ed25519 secret keys with keypairs
...
Part of #798 : We no longer use unescorted ed25519 secret keys.
2023-05-18 14:18:53 -04:00
Nick Mathewson
f333c9029a
Merge branch 'virtual_hop' into 'main'
...
tor-proto: Add support for extending circuits through virtual hops.
Closes #726
See merge request tpo/core/arti!1191
2023-05-18 17:14:01 +00:00
Nick Mathewson
e8e40e66f6
chanmgr: fix a unit-default warning from clippy nightly.
...
I could also have stopped using `::default()` to construct this
(testing-only) object, but I think it makes more sense to turn it
into a non-unit object.
2023-05-18 12:57:57 -04:00
Nick Mathewson
41863bd622
guardmgr, netdir: fix some needless-mut warnings
...
Found by clippy nightly
2023-05-18 12:54:55 -04:00
Nick Mathewson
45571b3ec7
guardmgr: suppress a clippy-nightly warning.
...
I don't love this change, but apparently we are trying for
"consistency".
2023-05-18 12:52:19 -04:00
Nick Mathewson
6f80caed9d
proto: Explain "virtual" hops better.
...
Based on text from @diziet
2023-05-18 12:40:02 -04:00