tls: default to Arti's rustls backend (drop OpenSSL from TLS)
All checks were successful
ci / test (pull_request) Successful in 6m47s
android-ci / android (pull_request) Successful in 8m21s
ci / sdk (pull_request) Successful in 1m25s

Arti's TLS backends are non-additive; the root crate defaulted to
`native-tls` (OpenSSL). Switch `default = ["rustls"]` and pin the `rustls`
crate with its `ring` feature — `tor-rtcompat` pulls rustls in with
`default-features = false`, so without that pin the backend compiles with no
`CryptoProvider` and the first TLS config fails (same reason already recorded
in crates/onionwire-sdk/Cargo.toml).

`native-tls` stays as an opt-in feature. SQLCipher still builds vendored
OpenSSL (`bundled-sqlcipher-vendored-openssl`); that is unrelated to TLS.

- tests/tls_backend.rs: compile-time pin that the default features select
  rustls, plus a runtime check that rustls resolves a provider with no manual
  install.
- ci.yml: the root `test` job no longer installs pkg-config/libssl-dev (the
  SDK job keeps it).
- docs: README build deps, ARTI_UPGRADE backend table, release-body and the
  SDK README now describe the rustls default; the false "binaries link
  libssl.so.3 dynamically" claim is corrected.
- crates/onionwire-sdk/Cargo.lock: regenerated for the root crate's new
  dependency (separate workspace, --locked would otherwise fail).
This commit is contained in:
Hermes rust-dev 2026-09-17 20:48:05 -04:00
commit 69672809ab
No known key found for this signature in database
10 changed files with 91 additions and 38 deletions

View file

@ -23,9 +23,11 @@ part of a Tor upgrade.
Two crate features re-expose Arti's TLS backends, which Arti marks
**non-additive** — exactly one may be selected per build graph:
* `native-tls` (default) → Linux TUI build, via OpenSSL.
* `rustls` → the Android SDK crate (`crates/onionwire-sdk`), because the NDK has
no OpenSSL.
* `rustls` (**default**) → every build: the Linux TUI, the released binaries and
the Android SDK. No system OpenSSL is needed for TLS; the root `Cargo.toml`
pins rustls's `ring` feature so the crypto provider resolves from crate
features (without it the rustls backend compiles with no provider).
* `native-tls` → opt-in only, via OpenSSL.
Published Arti releases move all four crates together in lockstep. Bump them as
**one set**. A mixed set (e.g. `arti-client` 0.47 with `tor-hsservice` 0.46) is
@ -118,8 +120,9 @@ issue the watcher files.
7. Confirm the fail-closed path by hand if the publish wait changed at all:
with the write timeout still 360s, a peer whose onion is down must fail the
send. There is no outbox in v1 — the message must not be silently queued.
8. Rebuild the Android target — Arti's TLS backends are non-additive, and this
is the build that exercises the `rustls` feature:
8. Rebuild the Android target. The root crate defaults to `rustls` now, so this
is less about exercising a non-default feature than about proving the default
still cross-compiles where OpenSSL does not exist:
```
scripts/build-android-local.sh
```