sqlx
sqlx copied to clipboard
Support building with rustls but native certificates
This adds an alternative TLS configuration that relies on rustls-native-certs, for users who cannot bundle the MPL-licensed webpki-roots.
The approach is copied from reqwest:
- https://github.com/seanmonstar/reqwest/blob/3ad6e02cd/Cargo.toml#L48
- https://github.com/seanmonstar/reqwest/blob/3ad6e02cd/src/async_impl/client.rs#L513
— except error handling is relaxed to accommodate for tls_config.root_cert_path.