Skip to content
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

allow ureq to use native certificate store #393

Merged
merged 3 commits into from
Mar 10, 2023

Conversation

eladyn
Copy link
Contributor

@eladyn eladyn commented Mar 9, 2023

Description

This introduces a passthrough of the native-certs feature flag of ureq, which allows the http client to load the OS certificate store.

Motivation and Context

Currently, rspotify always uses the webpki-roots certificates, when used with ureq, which makes it impossible to use e.g. self-signed certificates.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

I ran the non-modifying tests with a proxy sniffing the HTTPS traffic, which failed with ureq-rustls-tls and passed with ureq-rustls-tls-native-certs (since I added the used cert to the OS store).

Is this change properly documented?

I added the feature flag to one place in the documentation. Are there ones that I missed?

Additional notes

In theory, there's also a native-tls feature flag for ureq, but that requires creating a native-tls::TlsConnector. This can fail, which I don't know how to handle within the Default implementation, so I didn't do that for now. If you've got ideas how this could be done, I'll happily implement that.

@ramsayleung ramsayleung merged commit 31044f1 into ramsayleung:master Mar 10, 2023
@eladyn eladyn deleted the ureq_native_certs branch March 10, 2023 11:59
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