ssl: discover default certificate paths in host_env - #8649
Conversation
Keep host certificate path probing with the native certificate provider, select the first available OpenSSL-style file and directory, and leave environment overrides to ssl.py. This also gives Android string defaults instead of the previous None values. Co-authored-by: Ivan Mironov <[email protected]> Assisted-by: OpenAI Codex: GPT-5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds runtime discovery of native certificate file and directory paths. The SSL default verification API now returns these resolved paths instead of hardcoded platform values. ChangesNative certificate paths
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to SSL defaults now discover available native certificate paths at runtime while preserving platform-specific empty-path behavior. No concrete merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant SSL as get_default_verify_paths
participant NativeCerts as default_verify_paths
participant Filesystem as Host filesystem
SSL->>NativeCerts: Request native verification paths
NativeCerts->>Filesystem: Check platform-specific candidates
Filesystem-->>NativeCerts: Return existing file and directory
NativeCerts-->>SSL: Return cafile and capath strings
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/ssl.py dependencies:
dependent tests: (54 tests)
Legend:
|
Follow-up to #8646, moving the remaining host-specific default certificate path discovery behind rustpython-host_env and carrying over the candidate-path approach from #8007.
Summary
Test plan
Summary by CodeRabbit