tls: default to Arti's rustls backend (drop OpenSSL from TLS)
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:
parent
ad1b994c08
commit
69672809ab
10 changed files with 91 additions and 38 deletions
22
Cargo.toml
22
Cargo.toml
|
|
@ -8,16 +8,16 @@ license = "MIT"
|
|||
publish = false
|
||||
repository = "https://github.com/sirius0xdev/onionwire"
|
||||
|
||||
# The Linux TUI build is unchanged: `default` keeps Arti's native-tls
|
||||
# (OpenSSL) backend exactly as before, and ratatui remains a normal
|
||||
# dependency so `src/tui.rs` is untouched.
|
||||
# TLS backend: `rustls` by default, `native-tls` (OpenSSL) opt-in.
|
||||
#
|
||||
# Android has no OpenSSL in the NDK, so the SDK crate depends on this crate
|
||||
# with `default-features = false, features = ["rustls"]`. Arti marks these two
|
||||
# backends non-additive, so exactly one may be selected per build graph — hence
|
||||
# exposing them as crate features.
|
||||
# Arti marks these two backends non-additive, so exactly one may be selected per
|
||||
# build graph — hence exposing them as crate features. rustls is the default
|
||||
# because Android has no OpenSSL in the NDK and the Linux TUI/release build does
|
||||
# not need a system OpenSSL for TLS either. (OpenSSL is still *compiled* into
|
||||
# every build by rusqlite's `bundled-sqlcipher-vendored-openssl`, vendored and
|
||||
# static: that is the SQLCipher layer, not Arti's TLS.)
|
||||
[features]
|
||||
default = ["native-tls"]
|
||||
default = ["rustls"]
|
||||
native-tls = ["arti-client/native-tls"]
|
||||
rustls = ["arti-client/rustls"]
|
||||
|
||||
|
|
@ -37,6 +37,12 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "ti
|
|||
tor-cell = "0.46"
|
||||
tor-hsservice = "0.46"
|
||||
tor-rtcompat = { version = "0.46", features = ["tokio"] }
|
||||
# Direct dependency only to select rustls's crypto provider: Arti pulls rustls in
|
||||
# through `tor-rtcompat` with `default-features = false`, and rustls 0.23
|
||||
# resolves its provider from its OWN `ring`/`aws-lc-rs` features, so without this
|
||||
# line the rustls backend compiles with no provider at all and the first TLS
|
||||
# config fails. Same reasoning (and pin) as `crates/onionwire-sdk/Cargo.toml`.
|
||||
rustls = { version = "0.23", default-features = false, features = ["ring"] }
|
||||
ratatui = { version = "0.30.2", default-features = false, features = ["crossterm"] }
|
||||
x25519-dalek = { version = "2", features = ["static_secrets"] }
|
||||
snow = "0.10"
|
||||
|
|
|
|||
Loading…
Reference in a new issue