Commit Graph

4504 Commits

Author SHA1 Message Date
Ian Jackson 0154d82522 Merge branch 'cell-introduce2' into 'main'
Implement Introduce2 tor cell

See merge request tpo/core/arti!736
2022-09-26 12:07:33 +00:00
Nick Mathewson 893be16146 Merge branch 'pt-client-api-part-1' into 'main'
Add sketched-out pluggable transport APIs (part 1)

See merge request tpo/core/arti!740
2022-09-23 18:49:30 +00:00
Nick Mathewson 52ca64fe0d Add a few comments based on review. 2022-09-23 14:08:53 -04:00
Nick Mathewson 4f93eee67b Clarify and combine PtTargetAddr constructors. 2022-09-23 14:08:53 -04:00
Nick Mathewson 141afbbf61 Rename various Transport* types to Pt*.
This clarifies that the types apply to pluggable transports only,
and not (typically) to the default plain-old-TCP transport.
2022-09-23 14:08:53 -04:00
Ian Jackson 9df8ea215a Clarify note on "none" transport ID. 2022-09-23 14:08:36 -04:00
Nick Mathewson e412d7400c Add the skeleton of a tor-ptmgr crate
When complete, this crate will handle launching and using pluggable
transports on demand.
2022-09-23 14:08:24 -04:00
Nick Mathewson bd627c2e15 ChanMgr: new (unimplemented) APIs for pluggable transports 2022-09-23 14:08:24 -04:00
Nick Mathewson cd88e8cb0b Add a HasChanMethods trait, with a bunch of open TODO questions.
We'll need to sort these out as we implement pluggable transports.
2022-09-23 14:08:24 -04:00
Nick Mathewson cf135ad3eb New data types to describe transport targets.
I've tried to name and structure these for consistency, and
comment reasonably well.  We'll still probably want to make changes.
2022-09-23 14:08:24 -04:00
Nick Mathewson b056e69e1b Add TransportTargetAddr as the target address for a PT-using channel
As with `TransportId`, this type only gets complicated when
`pt-client` is enabled: it's meant to stay simple for relays and
non-PT-using clients.
2022-09-23 14:08:24 -04:00
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
Alexander Færøy 502b55d34b Merge branch 'ct_key_zero' into 'main'
Add a new constant-time is_zero() check for RsaIdentity

See merge request tpo/core/arti!735
2022-09-21 08:14:54 +00:00
Yuan Lyu 6e5874d15b
Implement Introduce2 tor cell
Reuse the same Introduce inner body implementation
of Introduce1.
2022-09-21 00:34:13 -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
eta 4793436ea1 Merge branch 'setuid-all-platforms' into 'main'
enumerate platform with getresuid support

Closes #582

See merge request tpo/core/arti!728
2022-09-14 15:25:50 +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
Nick Mathewson a11d292902 Merge branch 'no-inline-internalerror-test' into 'main'
force no inlining on internal_macro_test

Closes #570

See merge request tpo/core/arti!727
2022-09-09 15:52:09 +00: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
Ian Jackson 392f0b7ad2 Merge branch 'debug_570' into 'main'
Add a dbg!() to diagnose #570.

See merge request tpo/core/arti!726
2022-09-08 14:21:43 +00: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
Ian Jackson c4bc426be3 Merge branch 'schedule_drop' into 'main'
`TaskSchedule`: give error on `sleep*()` if last handle is dropped

Closes #572

See merge request tpo/core/arti!725
2022-09-07 16:15:45 +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 239c1f044f Add a reminder to remove semver.md after release. 2022-09-07 09:20:30 -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
Ian Jackson dfcbcbce08 Merge branch 'ci-repro' into 'main'
CI: build-repro: Bump image to 1.63, and other improvements

See merge request tpo/core/arti!716
2022-09-06 13:12:10 +00:00
Ian Jackson a4cf8bf577 maint/docker_reproducible_build: Bump image here too 2022-09-06 13:53:11 +01:00
Ian Jackson 3e15d54f64 maint/reproducible_build: Pass --locked to cargo build
We don't want any updates!
2022-09-06 13:53:11 +01:00
Ian Jackson 82fee7a8d6 maint/reproducible_build: Honour $CARGO
This makes it easier to test, and perform other kinds of stunts.
2022-09-06 13:53:11 +01:00
Ian Jackson ecf7723344 maint/reproducible_build: Centralise -p arti --features etc. 2022-09-06 13:53:11 +01:00
Ian Jackson 2fe613647a maint/reproducible_build: Bring "cargo build" invocations together 2022-09-06 13:53:11 +01:00
Ian Jackson cd48d2a741 CI: build-repro: Bump image to 1.63
tinystr 0.6.2 (which our Cargo.toml's permit and our Cargo.lock
specifies) has an MSRV of 1.60.

The symptom with earlier Rust is this from cargo:
   error: failed to select a version for the requirement `tinystr = "^0.6.0"`
(which is, on the face of it, nonsense).
2022-09-06 13:53:11 +01:00
eta 3b24d051f6 Merge branch 'tbb-no-red-page' into 'main'
document TOR_SKIP_CONTROLPORTTEST=1 for no warning on Tor Browser

See merge request tpo/core/arti!719
2022-09-05 16:57:22 +00:00
trinity-1686a 5e41e7dad4 document TOR_SKIP_CONTROLPORTTEST=1 for no warning on Tor Browser 2022-09-03 11:29:26 +02:00
Nick Mathewson f5effd320a Merge branch 'readme' into 'main'
READMEs: Remove many caveats and general tidying

See merge request tpo/core/arti!717
2022-09-02 16:51:12 +00: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