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

Export rustls crates #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Export rustls crates #49

wants to merge 2 commits into from

Conversation

FssAy
Copy link

@FssAy FssAy commented Feb 5, 2023

The rustls and rustls-pemfile in my opinion should be exported by async-tls as the library exposes functionality that requires a deep understanding of the types and functionality of the rustls crate.
The current state requires user to import the rustls crate on their own while it might cause errors while importing the wrong version.
For example:

async_tls::TlsAcceptor::from(std::sync::Arc(
     rustls::ServerConfig::builder().with_safe_defaults()?
));
the trait `From<std::sync::Arc<rustls::ServerConfig>>` is not implemented for `TlsAcceptor`
the following other types implement trait `From<T>`:
      <TlsAcceptor as From<std::sync::Arc<rustls::server::server_conn::ServerConfig>>>

This simple change would eliminate the issue:

async_tls::TlsAcceptor::from(std::sync::Arc(
     async_tls::rustls::ServerConfig::builder().with_safe_defaults()?
));

@FssAy FssAy changed the title Export rusttls crates Export rustls crates Feb 6, 2023
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.

1 participant