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

Remove webpki types from the public API #736

Closed
briansmith opened this issue Jun 14, 2021 · 5 comments
Closed

Remove webpki types from the public API #736

briansmith opened this issue Jun 14, 2021 · 5 comments

Comments

@briansmith
Copy link
Contributor

There will be several backward-compatibility-breaking changes to the webpki API over the next year and beyond. Since the goal for the Rustls API is to be pretty stable and rarely have breaking changes, we need to insulate Rustls from those changes so that it can upgrade its version of webpki to the latest (and only supported) version without changing its public API.

In the case of webpki::Error in Rustls's Error type, I think we should change it to Box<impl Debug> or similar.

@briansmith
Copy link
Contributor Author

@djc Besides webpki::Error, are there any remaining webpki types in the public API?

@djc
Copy link
Member

djc commented Jun 14, 2021

  • RootCertStore::add_server_trust_anchors()
  • Methods and From/Into impls for OwnedTrustAnchor
  • ClientHello::server_name
  • The DnsName variant in ServerName and <TryFrom<&str> for ServerName>::Error
  • CertifiedKey::cross_check_end_entity_cert()
  • ClientCertVerifier method arguments

@briansmith
Copy link
Contributor Author

  • RootCertStore::add_server_trust_anchors()
  • Methods and From/Into impls for OwnedTrustAnchor

These could be controlled with a webpki-<version> feature. Then we'd add new webpki-<version+1> feature for each webpki version.

ClientHello::server_name

It seems like this is a problem only because Rustls exposes a lot of internals to the outside that ideally shouldn't be exposed. I think we can/should hide these by default, and maybe provide an "unstable-api" feature that exposes them.

The DnsName variant in ServerName and <TryFrom<&str> for ServerName>::Error

I think the goal here is to make Rustls public API operate directly on &str or &[u8] or so.

@djc
Copy link
Member

djc commented Jul 27, 2021

I think the only open item here is impl From<webpki::Error> for WebPkiError, which is fixed in #792.

@djc
Copy link
Member

djc commented Sep 8, 2021

This is done.

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

No branches or pull requests

2 participants