Skip to main content

max / audiofiles

Move TLS to rustls to match shared synckit-client synckit-client switched to a rustls reqwest, so audiofiles follows to keep the binary on one TLS stack (rustls with the OS-native trust store via rustls-platform-verifier) instead of newly carrying native-tls + rustls. Since audiofiles has no tauri-plugin-updater to install a crypto provider, install ring::default_provider() at startup in audiofiles-app. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-23 16:50 UTC
Commit: 5a81b45149850499c63b1afb4a7f2a1d08e30789
Parent: cf0b447
4 files changed, +66 insertions, -101 deletions
M Cargo.lock +56 -100
@@ -396,6 +396,7 @@ dependencies = [
396 396 "parking_lot",
397 397 "reqwest",
398 398 "rfd",
399 + "rustls",
399 400 "semver",
400 401 "serde",
401 402 "serde_json",
@@ -983,7 +984,7 @@ dependencies = [
983 984 "bitflags 1.3.2",
984 985 "core-foundation 0.9.4",
985 986 "core-graphics-types",
986 - "foreign-types 0.5.0",
987 + "foreign-types",
987 988 "libc",
988 989 ]
989 990
@@ -1656,21 +1657,12 @@ dependencies = [
1656 1657
1657 1658 [[package]]
1658 1659 name = "foreign-types"
1659 - version = "0.3.2"
1660 - source = "registry+https://github.com/rust-lang/crates.io-index"
1661 - checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
1662 - dependencies = [
1663 - "foreign-types-shared 0.1.1",
1664 - ]
1665 -
1666 - [[package]]
1667 - name = "foreign-types"
1668 1660 version = "0.5.0"
1669 1661 source = "registry+https://github.com/rust-lang/crates.io-index"
1670 1662 checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
1671 1663 dependencies = [
1672 1664 "foreign-types-macros",
1673 - "foreign-types-shared 0.3.1",
1665 + "foreign-types-shared",
1674 1666 ]
1675 1667
1676 1668 [[package]]
@@ -1686,12 +1678,6 @@ dependencies = [
1686 1678
1687 1679 [[package]]
1688 1680 name = "foreign-types-shared"
1689 - version = "0.1.1"
1690 - source = "registry+https://github.com/rust-lang/crates.io-index"
1691 - checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
1692 -
1693 - [[package]]
1694 - name = "foreign-types-shared"
1695 1681 version = "0.3.1"
1696 1682 source = "registry+https://github.com/rust-lang/crates.io-index"
1697 1683 checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
@@ -2373,22 +2359,6 @@ dependencies = [
2373 2359 ]
2374 2360
2375 2361 [[package]]
2376 - name = "hyper-tls"
2377 - version = "0.6.0"
2378 - source = "registry+https://github.com/rust-lang/crates.io-index"
2379 - checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
2380 - dependencies = [
2381 - "bytes",
2382 - "http-body-util",
2383 - "hyper",
2384 - "hyper-util",
2385 - "native-tls",
2386 - "tokio",
2387 - "tokio-native-tls",
2388 - "tower-service",
2389 - ]
2390 -
2391 - [[package]]
2392 2362 name = "hyper-util"
2393 2363 version = "0.1.20"
2394 2364 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3114,23 +3084,6 @@ dependencies = [
3114 3084 ]
3115 3085
3116 3086 [[package]]
3117 - name = "native-tls"
3118 - version = "0.2.18"
3119 - source = "registry+https://github.com/rust-lang/crates.io-index"
3120 - checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
3121 - dependencies = [
3122 - "libc",
3123 - "log",
3124 - "openssl",
3125 - "openssl-probe",
3126 - "openssl-sys",
3127 - "schannel",
3128 - "security-framework",
3129 - "security-framework-sys",
3130 - "tempfile",
3131 - ]
3132 -
3133 - [[package]]
3134 3087 name = "ndk"
3135 3088 version = "0.9.0"
3136 3089 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3722,49 +3675,12 @@ dependencies = [
3722 3675 ]
3723 3676
3724 3677 [[package]]
3725 - name = "openssl"
3726 - version = "0.10.81"
3727 - source = "registry+https://github.com/rust-lang/crates.io-index"
3728 - checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
3729 - dependencies = [
3730 - "bitflags 2.13.1",
3731 - "cfg-if",
3732 - "foreign-types 0.3.2",
3733 - "libc",
3734 - "openssl-macros",
3735 - "openssl-sys",
3736 - ]
3737 -
3738 - [[package]]
3739 - name = "openssl-macros"
3740 - version = "0.1.1"
3741 - source = "registry+https://github.com/rust-lang/crates.io-index"
3742 - checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
3743 - dependencies = [
3744 - "proc-macro2",
3745 - "quote",
3746 - "syn 2.0.119",
3747 - ]
3748 -
3749 - [[package]]
3750 3678 name = "openssl-probe"
3751 3679 version = "0.2.1"
3752 3680 source = "registry+https://github.com/rust-lang/crates.io-index"
3753 3681 checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
3754 3682
3755 3683 [[package]]
3756 - name = "openssl-sys"
3757 - version = "0.9.117"
3758 - source = "registry+https://github.com/rust-lang/crates.io-index"
3759 - checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
3760 - dependencies = [
3761 - "cc",
3762 - "libc",
3763 - "pkg-config",
3764 - "vcpkg",
3765 - ]
3766 -
3767 - [[package]]
3768 3684 name = "option-ext"
3769 3685 version = "0.2.0"
3770 3686 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4287,21 +4203,21 @@ dependencies = [
4287 4203 "http-body-util",
4288 4204 "hyper",
4289 4205 "hyper-rustls",
4290 - "hyper-tls",
4291 4206 "hyper-util",
4292 4207 "js-sys",
4293 4208 "log",
4294 4209 "mime",
4295 - "native-tls",
4296 4210 "percent-encoding",
4297 4211 "pin-project-lite",
4212 + "rustls",
4298 4213 "rustls-pki-types",
4214 + "rustls-platform-verifier",
4299 4215 "serde",
4300 4216 "serde_json",
4301 4217 "serde_urlencoded",
4302 4218 "sync_wrapper",
4303 4219 "tokio",
4304 - "tokio-native-tls",
4220 + "tokio-rustls",
4305 4221 "tokio-util",
4306 4222 "tower",
4307 4223 "tower-http",
@@ -4491,7 +4407,9 @@ version = "0.23.42"
4491 4407 source = "registry+https://github.com/rust-lang/crates.io-index"
4492 4408 checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138"
4493 4409 dependencies = [
4410 + "log",
4494 4411 "once_cell",
4412 + "ring",
4495 4413 "rustls-pki-types",
4496 4414 "rustls-webpki",
4497 4415 "subtle",
@@ -4499,6 +4417,18 @@ dependencies = [
4499 4417 ]
4500 4418
4501 4419 [[package]]
4420 + name = "rustls-native-certs"
4421 + version = "0.8.4"
4422 + source = "registry+https://github.com/rust-lang/crates.io-index"
4423 + checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d"
4424 + dependencies = [
4425 + "openssl-probe",
4426 + "rustls-pki-types",
4427 + "schannel",
4428 + "security-framework",
4429 + ]
4430 +
4431 + [[package]]
4502 4432 name = "rustls-pki-types"
4503 4433 version = "1.15.0"
4504 4434 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4508,6 +4438,33 @@ dependencies = [
4508 4438 ]
4509 4439
4510 4440 [[package]]
4441 + name = "rustls-platform-verifier"
4442 + version = "0.7.0"
4443 + source = "registry+https://github.com/rust-lang/crates.io-index"
4444 + checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0"
4445 + dependencies = [
4446 + "core-foundation 0.10.1",
4447 + "core-foundation-sys",
4448 + "jni 0.22.4",
4449 + "log",
4450 + "once_cell",
4451 + "rustls",
4452 + "rustls-native-certs",
4453 + "rustls-platform-verifier-android",
4454 + "rustls-webpki",
4455 + "security-framework",
4456 + "security-framework-sys",
4457 + "webpki-root-certs",
4458 + "windows-sys 0.52.0",
4459 + ]
4460 +
4461 + [[package]]
4462 + name = "rustls-platform-verifier-android"
4463 + version = "0.1.1"
4464 + source = "registry+https://github.com/rust-lang/crates.io-index"
4465 + checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
4466 +
4467 + [[package]]
4511 4468 name = "rustls-webpki"
4512 4469 version = "0.103.13"
4513 4470 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5582,16 +5539,6 @@ dependencies = [
5582 5539 ]
5583 5540
5584 5541 [[package]]
5585 - name = "tokio-native-tls"
5586 - version = "0.3.1"
5587 - source = "registry+https://github.com/rust-lang/crates.io-index"
5588 - checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
5589 - dependencies = [
5590 - "native-tls",
5591 - "tokio",
5592 - ]
5593 -
5594 - [[package]]
5595 5542 name = "tokio-rustls"
5596 5543 version = "0.26.4"
5597 5544 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6324,6 +6271,15 @@ dependencies = [
6324 6271 ]
6325 6272
6326 6273 [[package]]
6274 + name = "webpki-root-certs"
6275 + version = "1.0.9"
6276 + source = "registry+https://github.com/rust-lang/crates.io-index"
6277 + checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b"
6278 + dependencies = [
6279 + "rustls-pki-types",
6280 + ]
6281 +
6282 + [[package]]
6327 6283 name = "weezl"
6328 6284 version = "0.1.12"
6329 6285 source = "registry+https://github.com/rust-lang/crates.io-index"
M Cargo.toml +4 -1
@@ -42,7 +42,10 @@ uuid = { version = "1", features = ["v4"] }
42 42 base64 = "0.22"
43 43 chrono = "0.4"
44 44 rand = "0.10"
45 - reqwest = { version = "0.13", default-features = false, features = ["json", "native-tls"] }
45 + # rustls-no-provider: rustls TLS with the OS-native trust store (rustls-platform-verifier);
46 + # audiofiles-app installs the ring crypto provider once at startup.
47 + reqwest = { version = "0.13", default-features = false, features = ["json", "rustls-no-provider"] }
48 + rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "logging", "ring"] }
46 49 semver = "1"
47 50 open = "5"
48 51 rayon = "1.10"
@@ -17,6 +17,7 @@ tracing-subscriber = { workspace = true }
17 17 tray-icon = { workspace = true }
18 18 tokio = { workspace = true }
19 19 reqwest = { workspace = true }
20 + rustls = { workspace = true }
20 21 semver = { workspace = true }
21 22 serde = { workspace = true }
22 23 serde_json = { workspace = true }
@@ -53,6 +53,11 @@ const SYNC_SERVER_URL: &str = "https://makenot.work";
53 53 /// audio output stream for sample preview, and opens an eframe window running
54 54 /// the shared egui browser UI.
55 55 fn main() -> eframe::Result<()> {
56 + // Install the process-wide rustls crypto provider (ring) before any TLS client
57 + // (reqwest via synckit / license activation) builds a config. All TLS validates
58 + // against the OS-native trust store via rustls-platform-verifier.
59 + let _ = rustls::crypto::ring::default_provider().install_default();
60 +
56 61 // GTK must be initialized before tray-icon (libappindicator) on Linux.
57 62 // Non-fatal: tray icon won't work but the app remains usable.
58 63 #[cfg(target_os = "linux")]