tls: default to Arti's rustls backend (drop OpenSSL from TLS) #100
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_17e3d3cf-rustls-default"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the hardening note "rustls default": the root crate no longer selects Arti's
native-tls(OpenSSL) backend by default.Change
Cargo.toml:default = ["rustls"](was["native-tls"]), still exposed as an opt-in feature; the crate's TLS default is now the same as the Android SDK's.Cargo.toml: new directrustls = { version = "0.23", default-features = false, features = ["ring"] }. This is load-bearing, not cosmetic:tor-rtcompatpulls rustls in withdefault-features = false, and rustls 0.23 resolves its provider from its OWNring/aws-lc-rsfeatures — without this pin the backend compiles with zero providers and the first TLS config fails. Same pin and reasoning ascrates/onionwire-sdk/Cargo.toml.tests/tls_backend.rs(new): a compile-time assertion that the default feature set selectsrustlsand notnative-tls(the target stops compiling ifdefaultmoves back), plus a runtime check that building arustls::ClientConfigthe way Arti does resolves aCryptoProviderwith no manual install..forgejo/workflows/ci.yml: the roottestjob no longer runsapt-get install pkg-config libssl-dev. Thesdkjob keeps it (unchanged SDK build).README.mdbuild deps,docs/ARTI_UPGRADE.mdbackend table + step 8,scripts/release-body.md,crates/onionwire-sdk/README.md.crates/onionwire-sdk/Cargo.lock: regenerated — the SDK is a separate workspace and its lock records the root package's dependency list, socargo test --lockedthere would otherwise fail with "cannot update the lock file".Evidence
RED first (unmodified
Cargo.toml), then GREEN:Acceptance commands on the final commit:
native-tlsis genuinely out of the graph, not just un-defaulted:Link-level confirmation (same target dir, baseline binary is the pre-change release build):
OpenSSL TLS symbols are gone; the EVP symbols that remain are SQLCipher's vendored, static OpenSSL (
rusqlitefeaturebundled-sqlcipher-vendored-openssl), which is unrelated to Arti's TLS and still needsperl+maketo build — not the-devheaders.Scope notes
crates/onionwire-sdk/Cargo.toml: comment-only edit. The card said not to modify that file; its header comment claimed "the Linux TUI crate keeps native-tls", which this change makes false. No feature, dependency or lock-affecting change — the SDK's resolution is untouched (default-features = false, features = ["rustls"]stays). Flagging it explicitly rather than leaving a knowingly false comment.README.md/scripts/release-body.mdclaim that the binaries linklibssl.so.3dynamically was already false before this change (the baseline release binary has no dynamiclibsslNEEDED entry); corrected with thereadelfevidence above..forgejo/workflows/release.ymlstill installspkg-config libssl-devin its build jobs. Left alone: this card scoped the CI edit toci.yml, and the vendored OpenSSL build is the same in both. Worth a follow-up if the install turns out to be dead weight there too.android-ci.yml/android-release.ymlcover it and the AAR only builds on a tag.Acceptance
cargo check --locked— exit 0, rustls default, no OpenSSL TLS.cargo test --locked— 292 passed, 0 failed.cargo clippy --locked --all-targets -- -D warnings— clean.ci.ymlroottestjob no longer installslibssl-dev; thesdkjob still does.