Skip to content

Add configurable TLS feature flags for reqwest - #43

Merged
cmackenzie1 merged 1 commit into
mainfrom
claude/fix-issue-41-yLLLk
May 19, 2026
Merged

Add configurable TLS feature flags for reqwest#43
cmackenzie1 merged 1 commit into
mainfrom
claude/fix-issue-41-yLLLk

Conversation

@cmackenzie1

Copy link
Copy Markdown
Owner

Summary

This change introduces configurable TLS feature flags to allow users to choose their preferred TLS implementation when using this library, rather than being locked into rustls-tls.

Key Changes

  • Added a new [features] section to Cargo.toml with multiple TLS options:
    • rustls-tls (default): Uses rustls with system roots
    • rustls-tls-native-roots: Uses rustls with native certificate roots
    • native-tls: Uses the platform's native TLS implementation
    • native-tls-vendored: Uses vendored native TLS
  • Updated the reqwest dependency to remove the hardcoded rustls-tls feature
  • TLS feature selection is now delegated to Cargo's feature resolution system

Implementation Details

  • The default feature remains rustls-tls to maintain backward compatibility
  • Users can now opt into alternative TLS implementations by specifying features when adding this crate as a dependency
  • The reqwest dependency now only explicitly requires the json feature, with TLS features being optional and controlled by this crate's feature flags

https://claude.ai/code/session_014PcmRepV7DMLBi2TnVfoPo

Exposes reqwest's TLS backend options as crate features so users with
self-signed or corporate CA certificates (e.g. Keycloak on a homelab)
can opt into native-tls or rustls with native roots without needing to
declare a direct reqwest dependency.

- default = ["rustls-tls"] preserves existing behaviour
- rustls-tls-native-roots: rustls using the OS certificate store
- native-tls: OS-native TLS stack (trusts system cert store)
- native-tls-vendored: statically-linked native TLS

Closes #41

https://claude.ai/code/session_014PcmRepV7DMLBi2TnVfoPo
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.29%. Comparing base (06efdf1) to head (5d0997a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage   88.29%   88.29%           
=======================================
  Files           3        3           
  Lines         547      547           
=======================================
  Hits          483      483           
  Misses         64       64           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cmackenzie1
cmackenzie1 merged commit 79819ec into main May 19, 2026
3 checks passed
@cmackenzie1
cmackenzie1 deleted the claude/fix-issue-41-yLLLk branch May 19, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants