Commit Graph

2400 Commits

Author SHA1 Message Date
Nick Mathewson 63dbc7b22d Create an API for TransportId 2022-09-23 09:55:33 -04:00
Ian Jackson a773a753b3 Merge branch 'fix-nightly-clippy' into 'main'
Fix nightly clippy

See merge request tpo/core/arti!729
2022-09-22 16:45:52 +00:00
Ian Jackson 10d3fd9e9f Apply 1 suggestion(s) to 1 file(s) 2022-09-22 16:25:08 +00:00
Ian Jackson 3a8bcd6fc6 Merge branch 'channel-usage-doc' into 'main'
Improve docs for ChannelUsage

See merge request tpo/core/arti!737
2022-09-22 13:30:10 +00:00
Ian Jackson 6b7b4896bb Merge branch 'expose-builder' into 'main'
CircMgr: Add an accessor for the CircuitBuilder.

See merge request tpo/core/arti!738
2022-09-22 13:28:04 +00:00
Nick Mathewson 67b88547c5 CircMgr: Add an accessor for the CircuitBuilder.
Without this, actually building circuits manually is a pain.

This API is behind the `experimental-api` feature, and so it does
not require a semver.md entry.
2022-09-22 08:57:34 -04:00
Nick Mathewson 016a362f8b Improve docs for ChannelUsage
Try to clarify more that the ChannelUsage is for describing the
usage for one particular channel request, not for the channel as a
whole.  This is a potentially confusing point, so we should spell it
out completely.
2022-09-22 08:49:32 -04:00
Nick Mathewson 3e922e5ede Intoduce1: Use a constant-time check for all-zero RsaIdentity
As a matter of good crypto practice, we shouldn't use
short-circuiting checks to compare keys or key-like objects, since
the amount of time taken by those checks can leak information about
their inputs.

I don't think it's actually _necessary_ to use a constant-time
operation in this case, but let's establish the precedent.

This is a follow-up to !724.
2022-09-20 09:36:49 -04:00
Nick Mathewson 657914f778 Add a new constant-time is_zero() check for RsaIdentity
There are some places in the protocol where we have an all-zero RSA
identity that does not truly represent a key, but rather represents
an absent or unknown key.  For these, it's better to use
`RsaIdentity::is_zero` instead of manually checking for a set of
zero bytes: it expresses the intent better, and ensures that the
operation is constant-time.

I am deliberately not introducing a more general IsZero trait here,
or implementing is_zero for anything else: This is the only one we
seem to need right now.  We can generalize it later if we have to.
2022-09-20 09:13:31 -04:00
Nick Mathewson 7715b9c8d6 Merge branch 'cell-introduce1' into 'main'
Implement onion service Introduce1

See merge request tpo/core/arti!724
2022-09-20 13:02:02 +00:00
trinity-1686a 8e7a904260 fix clippy::needless_borrow 2022-09-10 14:39:47 +02:00
trinity-1686a dcbdd076eb fix clippy::unwrap_used and old TODO for msrv 1.56 2022-09-10 14:37:32 +02:00
trinity-1686a edfd416ba4 enumerate platform with getresuid support 2022-09-10 14:13:26 +02:00
trinity-1686a cb9f085f77 force no inlining on internal_macro_test
it may fix this test when running in release, where the function gets inlined, so its name does not appear in the backtrace
2022-09-09 17:29:59 +02:00
Yuan Lyu 1a3b979ecf
Implement onion service Introduce1 2022-09-08 23:48:56 -04:00
Nick Mathewson a7d9d2ceb1 Add a dbg!() to diagnose #570.
This won't fix anything, but it will let us see what the backtrace
looks like when it fails.
2022-09-08 09:58:05 -04:00
eta d9c140992f Merge branch 'fix-async-std' into 'main'
fix compilation error with async-std

See merge request tpo/core/arti!723
2022-09-07 17:16:28 +00:00
Nick Mathewson 86e479ae13 `TaskSchedule`: give error on `sleep*()` if last handle is dropped
This fixes an busy-loop.

When the last `TaskHandle` on a `TaskSchedule` is dropped, the
schedule is permanently canceled: whatever operation it was
scheduling should no longer be performed.  But our code was broken:
the `sleep()` and `sleep_until_wallclock()` functions don't verify
whether the handles are dropped or not.

This breakage caused an CPU-eating busy-loop in
`sleep_until_wallclock`.

With this patch, we now return a `Result<(), SleepError>` from these
functions.

Fixes #572.
2022-09-07 09:22:38 -04:00
Nick Mathewson a5f704f443 Remove semver.md from arti-1.0.0 2022-09-07 09:17:00 -04:00
trinity-1686a 4c543b570a fix compilation error with async-std 2022-09-06 21:32:20 +02:00
trinity-1686a 5e41e7dad4 document TOR_SKIP_CONTROLPORTTEST=1 for no warning on Tor Browser 2022-09-03 11:29:26 +02:00
Ian Jackson f62e2f48d4 READMEs: Drop stability warning re config
The referenced ticket is closed and I think the top-level caveats
remaining after !717 are sufficient.
2022-09-02 17:29:11 +01:00
Ian Jackson 52d9b8103a READMEs: Run maint/readmes (to update READMEs from lib.rs) 2022-09-02 17:08:08 +01:00
Ian Jackson 1f78b781f1 docs: Move Tor Browser part to arti top-level (rustfmt etc.) 2022-09-02 17:07:42 +01:00
Ian Jackson 6ae54b4623 arti-client README: Say we intend to provide FFI 2022-09-02 17:07:37 +01:00
Ian Jackson bed312bdcf README: Remove caveats from Tor Browser instructions 2022-09-02 17:07:37 +01:00
Ian Jackson 7581a425b3 README: Fix links to Tor Browser 2022-09-02 17:07:34 +01:00
Ian Jackson fc5c7ce55e docs: Move Tor Browser part to arti top-level (syntax fixup) 2022-09-02 17:07:17 +01:00
Ian Jackson b19547e15a docs: Move Tor Browser part to arti top-level (code motion) 2022-09-02 16:58:15 +01:00
Ian Jackson 78d633b940 README: change an NB to Note
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/717#note_2834307
2022-09-02 16:44:13 +01:00
Ian Jackson c0189e02b7 READMEs: arti-client: Remove caveats and add some xrefs 2022-09-02 14:51:31 +01:00
Ian Jackson d512036549 READMEs: arti (CLI): Remove several caveats, and tidying 2022-09-02 14:51:31 +01:00
Ian Jackson 905aa29a9f Merge branch 'update-notify' into 'main'
update to notify v5.0.0

Closes #454

See merge request tpo/core/arti!679
2022-09-01 16:18:20 +00:00
Nick Mathewson 96875ea208 Bump crate versions in preparation for Arti 1.0.0 release.
Because we want to work more on ensuring that our semver stability
story is solid, we are _not_ bumping arti-client to 1.0.0 right now.

Here are the bumps we _are_ doing.  Crates with "minor" bumps have
had API breaks; crates with "patch" bumps have had new APIs added.

Note that `tor-congestion` is not bumped here: it's a new crate, and
hasn't been published before.

```
tor-basic-utils         minor
fs-mistrust             minor
tor-config              minor
tor-rtcompat            minor
tor-rtmock              minor
tor-llcrypto            patch
tor-bytes               patch
tor-linkspec            minor
tor-cell                minor
tor-proto               minor
tor-netdoc              patch
tor-netdir              minor
tor-persist             patch
tor-chanmgr             minor
tor-guardmgr            minor
tor-circmgr             minor
tor-dirmgr              minor
arti-client             minor
arti-hyper              minor
arti                    major
arti-bench              minor
arti-testing            minor
```
2022-09-01 08:59:49 -04:00
Nick Mathewson b3f989d689 Update patch-versions on crates without API changes.
Since our last round of releases, these crates have had either
trivial changes, or changes that did not affect their APIs.
Therefore we are bumping their versions, but not changing which
versions of them other crates depend on.
2022-09-01 08:45:02 -04:00
Alexander Færøy 276d472739 Fix broken build and tests after arti!700.
This patch fixes a minor build error where we would call
`compact_home()` on Windows instead of `anonymize_home()` on our PathBuf
instance.

Additionally we change how the `arti_conf` path is constructed such that
we join the individual path components to ensure that no "/" ends up
being present on Windows where path's are separated by "\".

See: tpo/core/arti#555.
See: tpo/core/arti!700.
2022-08-31 20:36:01 +02:00
trinity-1686a e1e3f912b3 update to v5.0.0 2022-08-31 19:08:06 +02:00
Nick Mathewson 6406e4db74 Merge branch 'ahf/563-appveyor-test-fix' into 'main'
Shorten the duration needed in preemptive::test::does_not_predict_old_ports.

See merge request tpo/core/arti!708
2022-08-31 17:00:17 +00:00
Nick Mathewson 2b5070640c Merge branch 'rustdoc_fix_20220831' into 'main'
Fix a rustdoc link error.

See merge request tpo/core/arti!711
2022-08-31 16:59:16 +00:00
Nick Mathewson 874ba13501 Fix a rustdoc link error. 2022-08-31 12:24:39 -04:00
Nick Mathewson 2221b66b74 Add test warning exceptions to arti::cfg::test 2022-08-31 11:22:18 -04:00
Nick Mathewson 8b6f4cc69d Update README.md files with "readmes" tool. 2022-08-31 11:08:03 -04:00
Nick Mathewson 77cb5acceb Merge branch 'compact_home_2' into 'main'
Represent the home directory as ${HOME} or %UserProfile%

Closes #555

See merge request tpo/core/arti!700
2022-08-31 13:57:11 +00:00
Nick Mathewson a9f19b0045 Use anonymize_home() when displaying various messages.
Closes #555
2022-08-31 09:38:35 -04:00
Nick Mathewson 7888ca09d2 fs-mistrust: Add a `anonymize_home` extension fn for Path.
This function transforms `/home/nickm/.config` to
`${HOME}/.config/`, so that we can expose the username less in our
logs.
2022-08-31 09:38:09 -04:00
Nick Mathewson 210c8f883c Merge branch 'ahf/557-mistrust-fixes-3' into 'main'
Add AppVeyor config (but do not enable it) and disable a few tests for Windows

See merge request tpo/core/arti!705
2022-08-31 13:25:38 +00:00
Nick Mathewson 8d6a1ea6ec Merge branch 'refactor-anyhow-arti-crate' into 'main'
Remove `anyhow` from `tor-config` crate

See merge request tpo/core/arti!707
2022-08-31 13:14:46 +00:00
Nick Mathewson 60e1a5c400 Merge branch 'upgrade_2022_0830' into 'main'
Upgrade and update dependencies in preparation for release.

See merge request tpo/core/arti!703
2022-08-31 13:06:01 +00:00
Alexander Færøy 3e3a68683c Shorten the duration needed in preemptive::test::does_not_predict_old_ports.
This patch shortens the duration of the `does_not_predict_old_ports`
test in the preemptive module. AppVeyor spawns its VMs/containers per
build, so the `Instant::now()` call returns a value smaller than `60 *
60 + 1` which causes the subtraction to overflow and thus panic.

Thanks to @trinity-1686a for the help here.

See: tpo/core/arti#563.
2022-08-31 14:52:40 +02:00
Nick Mathewson db50d57880 Upgrade serial_test in preparation for release. 2022-08-30 20:09:19 -04:00