Skip to content

Commit bfd9cc0

Browse files
authored
feat: add native-tls as an optional TLS backend (#631)
Add reqwest-native-tls feature flag to allow users to choose between rustls (default) and native-tls for HTTP transports. native-tls uses platform-native TLS implementations: - OpenSSL on Linux - Secure Transport on macOS - SChannel on Windows This is particularly useful for Linux distribution packagers who need to link against system TLS libraries (e.g., OpenSSL) rather than bundling a separate TLS implementation. Linking against system libs ensures security updates are applied system-wide and satisfies distribution packaging policies. Updated documentation to explain the available TLS backend options.
1 parent 53b64a9 commit bfd9cc0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

crates/rmcp/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ reqwest = ["__reqwest", "reqwest?/rustls-tls"]
8888

8989
reqwest-tls-no-provider = ["__reqwest", "reqwest?/rustls-tls-no-provider"]
9090

91+
reqwest-native-tls = ["__reqwest", "reqwest?/native-tls"]
92+
9193
server-side-http = [
9294
"uuid",
9395
"dep:rand",

crates/rmcp/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ RMCP uses feature flags to control which components are included:
270270
- `transport-streamable-http-client-reqwest`: a default `reqwest` implementation of the streamable http client
271271
- `auth`: OAuth2 authentication support
272272
- `schemars`: JSON Schema generation (for tool definitions)
273+
- TLS backend options (for HTTP transports):
274+
- `reqwest`: Uses rustls (pure Rust TLS, recommended default)
275+
- `reqwest-native-tls`: Uses platform native TLS (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows)
276+
- `reqwest-tls-no-provider`: Uses rustls without a default crypto provider (bring your own)
273277

274278

275279
## Transports

0 commit comments

Comments
 (0)