Commit a8831a7
committed
login: harden custom CA handling and isolate env-based tests
Enterprise TLS inspection proxies use custom roots, so OAuth token exchanges
fail when we only trust system CAs. This change switches PEM parsing to
rustls-pki-types (multi-cert bundles included) and surfaces clearer, user-
facing errors that explain how to fix invalid or empty CA files via
CODEX_CA_CERTIFICATE/SSL_CERT_FILE.
To avoid cross-test races with process-wide env vars, CA path selection now
uses a small EnvSource abstraction in unit tests, and environment-dependent
behavior is verified via an assert_cmd-driven login_ca_probe helper binary.
This keeps normal tests isolated while still validating env precedence and
error messaging.
Also updates login dev-deps (assert_cmd/pretty_assertions), removes serial_test,
and re-exports build_login_http_client for the probe helper.1 parent 99b566d commit a8831a7
File tree
7 files changed
+282
-232
lines changed- codex-rs
- login
- src
- bin
- tests
7 files changed
+282
-232
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments