-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ureq-native-tls feature to actually use native-tls #471
Conversation
ureq-native-tls currently doesn't work because ureq requires the TLS connector to be specified explicitly for native-tls: > `native-tls` enables an adapter so you can pass a > `native_tls::TlsConnector` instance to `AgentBuilder::tls_connector`. > Due to the risk of diamond dependencies accidentally switching on an > unwanted TLS implementation, `native-tls` is never picked up as a > default or used by the crate level convenience calls (`ureq::get` > etc) – it must be configured on the agent. > -- https://github.com/algesten/ureq#features When ncspot is built with rspotify with ureq-native-tls, it's unable to create an HTTPS connection: [ncspot::spotify_api] [DEBUG] http error: Transport(Transport { kind: UnknownScheme, message: Some("cannot make HTTPS request because no TLS backend is configured"), url: Some(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.spotify.com")), port: None, path: "/v1/me/", query: None, fragment: None }), source: None })
If I understand correctly, if you want to use |
You have to explicitly pass a |
Thanks for the contribution :) |
Can you please release a new version soon? :) |
Yeah, I've released the |
reqwest uses native TLS, but rspotify with ureq currently uses rustls, i.e. ncspot bundles rustls and is linked with system TLS library at the same time. This has already been fixed in 80da5a8, but this commit has been reverted in aeff120 due to a bug in rspotify that was fixed in 0.13.1 (ramsayleung/rspotify#471).
reqwest uses native TLS, but rspotify with ureq currently uses rustls, i.e. ncspot bundles rustls and is linked with system TLS library at the same time. This has already been fixed in 80da5a8, but this commit has been reverted in aeff120 due to a bug in rspotify that was fixed in 0.13.1 (ramsayleung/rspotify#471).
* chore(deps): bump rspotify to 0.13.1 * Use native TLS only, don't mix it with rustls reqwest uses native TLS, but rspotify with ureq currently uses rustls, i.e. ncspot bundles rustls and is linked with system TLS library at the same time. This has already been fixed in 80da5a8, but this commit has been reverted in aeff120 due to a bug in rspotify that was fixed in 0.13.1 (ramsayleung/rspotify#471).
Description
Feature
ureq-native-tls
currently doesn't work because ureq requires the TLSconnector to be specified explicitly for native-tls:
When ncspot is built with rspotify with ureq-native-tls, it's unable to
create an HTTPS connection:
Motivation and Context
rspotify currently doesn’t work when built with
ureq-native-tls
.Dependencies
tls-native
(optional)Type of change
Please delete options that are not relevant.
How has this been tested?
CI
Is this change properly documented?
Yes
Related to #402
Fixes hrkfdn/ncspot#1159