Skip to content

Commit d269d84

Browse files
committed
Add support for rustls-platform-verifier
1 parent 064d649 commit d269d84

File tree

10 files changed

+235
-72
lines changed

10 files changed

+235
-72
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
[#4045]: https://github.com/launchbadge/sqlx/pull/4045
11+
812
## 0.9.0-alpha.1 - 2025-05-19
913

1014
Accumulated changes since the beginning of the alpha cycle. Effectively a draft CHANGELOG for the 0.9.0 release.

Cargo.lock

Lines changed: 141 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ runtime-tokio = ["_rt-tokio", "sqlx-core/_rt-tokio", "sqlx-macros?/_rt-tokio"]
102102
tls-native-tls = ["sqlx-core/_tls-native-tls", "sqlx-macros?/_tls-native-tls"]
103103
tls-rustls = ["tls-rustls-ring"] # For backwards compatibility
104104
tls-rustls-aws-lc-rs = ["sqlx-core/_tls-rustls-aws-lc-rs", "sqlx-macros?/_tls-rustls-aws-lc-rs"]
105+
tls-rustls-aws-lc-rs-platform-verifier = ["sqlx-core/_tls-rustls-aws-lc-rs-platform-verifier", "sqlx-macros?/_tls-rustls-aws-lc-rs-platform-verifier"]
105106
tls-rustls-ring = ["tls-rustls-ring-webpki"] # For backwards compatibility
106107
tls-rustls-ring-webpki = ["sqlx-core/_tls-rustls-ring-webpki", "sqlx-macros?/_tls-rustls-ring-webpki"]
107-
tls-rustls-ring-native-roots = ["sqlx-core/_tls-rustls-ring-native-roots", "sqlx-macros?/_tls-rustls-ring-native-roots"]
108+
tls-rustls-ring-native-roots = ["tls-rustls-ring-platform-verifier"] # For backwards compatibility
109+
tls-rustls-ring-platform-verifier = ["sqlx-core/_tls-rustls-aws-lc-rs-platform-verifier", "sqlx-macros?/_tls-rustls-aws-lc-rs-platform-verifier"]
108110

109111
# No-op feature used by the workflows to compile without TLS enabled. Not meant for general use.
110112
tls-none = []

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-native-tls" ] }
139139
# tokio + rustls with ring and WebPKI CA certificates
140140
sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls-ring-webpki" ] }
141141
# tokio + rustls with ring and platform's native CA certificates
142-
sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls-ring-native-roots" ] }
142+
sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls-ring-platform-verifier" ] }
143143
# tokio + rustls with aws-lc-rs
144144
sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls-aws-lc-rs" ] }
145+
# tokio + rustls with aws-lc-rs and platform's native CA certificates
146+
sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls-aws-lc-rs-platform-verifier" ] }
145147

146148
# async-std (no TLS)
147149
sqlx = { version = "0.8", features = [ "runtime-async-std" ] }
@@ -150,9 +152,11 @@ sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-native-tls" ] }
150152
# async-std + rustls with ring and WebPKI CA certificates
151153
sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-rustls-ring-webpki" ] }
152154
# async-std + rustls with ring and platform's native CA certificates
153-
sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-rustls-ring-native-roots" ] }
155+
sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-rustls-ring-platform-verifier" ] }
154156
# async-std + rustls with aws-lc-rs
155157
sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-rustls-aws-lc-rs" ] }
158+
# async-std + rustls with aws-lc-rs and platform's native CA certificates
159+
sqlx = { version = "0.8", features = [ "runtime-async-std", "tls-rustls-aws-lc-rs-platform-verifier" ] }
156160
```
157161

158162
#### Cargo Feature Flags

sqlx-cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ default = ["postgres", "sqlite", "mysql", "native-tls", "completions", "sqlx-tom
5858
# TLS options
5959
rustls = ["sqlx/tls-rustls"]
6060
native-tls = ["sqlx/tls-native-tls"]
61+
tls-rustls-aws-lc-rs-platform-verifier = ["sqlx/tls-rustls-aws-lc-rs-platform-verifier"]
62+
tls-rustls-ring-platform-verifier = ["sqlx/tls-rustls-aws-lc-rs-platform-verifier"]
63+
6164

6265
# databases
6366
mysql = ["sqlx/mysql"]

sqlx-core/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ _rt-tokio = ["tokio", "tokio-stream"]
2929

3030
_tls-native-tls = ["native-tls"]
3131
_tls-rustls-aws-lc-rs = ["_tls-rustls", "rustls/aws-lc-rs", "webpki-roots"]
32+
_tls-rustls-aws-lc-rs-platform-verifier = ["_tls-rustls", "rustls/aws-lc-rs", "rustls-platform-verifier"]
3233
_tls-rustls-ring-webpki = ["_tls-rustls", "rustls/ring", "webpki-roots"]
33-
_tls-rustls-ring-native-roots = ["_tls-rustls", "rustls/ring", "rustls-native-certs"]
34+
_tls-rustls-ring-platform-verifier = ["_tls-rustls", "rustls/ring", "rustls-platform-verifier"]
3435
_tls-rustls = ["rustls"]
3536
_tls-none = []
3637

@@ -57,7 +58,7 @@ native-tls = { version = "0.2.10", optional = true }
5758

5859
rustls = { version = "0.23.24", default-features = false, features = ["std", "tls12"], optional = true }
5960
webpki-roots = { version = "0.26", optional = true }
60-
rustls-native-certs = { version = "0.8.0", optional = true }
61+
rustls-platform-verifier = { version = "0.6", optional = true }
6162

6263
# Type Integrations
6364
bit-vec = { workspace = true, optional = true }

0 commit comments

Comments
 (0)