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

@ -2776,6 +2776,7 @@ dependencies = [
"ratatui",
"rpassword",
"rusqlite",
"rustls",
"safelog",
"serde_json",
"sha2",

View file

@ -7,11 +7,8 @@ description = "OnionWire Android/Kotlin SDK: in-process Arti onion transport, No
license = "MIT"
publish = false
# Standalone workspace on purpose.
# Arti's TLS backends (`native-tls` vs `rustls`) are non-additive: exactly one
# may be enabled per feature resolution. The Linux TUI crate keeps native-tls,
# Android has no OpenSSL in the NDK and needs rustls. Two separate workspaces
# keep the two resolutions from colliding — this crate path-depends on the
# Standalone workspace on purpose: the SDK carries its own lockfile and its own
# crate set (Android: `static-sqlite`, rustls TLS), so it path-depends on the
# root package without joining its feature graph.
[workspace]
resolver = "2"

View file

@ -126,7 +126,7 @@ output.
## Why this crate has its own Cargo workspace
Arti's TLS backends are **non-additive**: exactly one of `native-tls` and
`rustls` may be enabled in a given feature resolution. The Linux TUI keeps
`native-tls` (OpenSSL, as it always has). Android has no OpenSSL in the NDK, so
this crate selects `rustls` plus `static-sqlite` (no system `libsqlite3` on
Android). Two separate workspaces keep the two resolutions from colliding.
`rustls` may be enabled in a given feature resolution. The root crate defaults
to `rustls` (Linux TUI and releases), so this crate does not differ from the
root on TLS; it does add `static-sqlite`, because Android has no system
`libsqlite3`. Two separate workspaces keep the two resolutions from colliding.