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

Use rustls-pki-types via rustls crate #155

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Jan 21, 2024

rustls-pki-types is only used in __rustls feature.

Cargo.toml Outdated
@@ -25,7 +25,7 @@ multipart = {version = "0.18.0", default-features = false, features = ["client"]
native-tls = {version = "0.2.10", optional = true}
rustls-native-certs = { version = "0.7", optional = true}
rustls-opt-dep = {package = "rustls", version = "0.22.0", optional = true}
rustls-pki-types = "1"
rustls-pki-types = {version = "1", optional = true}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't this dependency is necessary at all as the types are re-exported as rustls::pki_types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The re-exporting was introduced at rustls 0.22.1. So when we want to use rustls-pki-types crate via rustls, we have to set the rustls minimum version requirement as 0.22.1 instead of 0.22.0. Which option is appropriate for attohttpc?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 0.22.1 is fully semver-compatible with 0.22.0, I see little downside to bumping rustls. Most leaf projects will regularly run cargo update anyway so that the final result would be the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I will change to use rustls-pki-types via rustls crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@tottoto tottoto changed the title Make rustls-pki-types dependency optional Use rustls-pki-types via rustls crate Jan 21, 2024
@sbstp
Copy link
Owner

sbstp commented Jan 21, 2024

Awesome thanks to you both

@sbstp sbstp merged commit aa13866 into sbstp:master Jan 21, 2024
4 checks passed
@tottoto tottoto deleted the make-rustls-pki-types-optional branch January 21, 2024 20:23
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.

3 participants