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

Unable to use a custom Acceptor #3200

Open
lovasoa opened this issue Nov 22, 2023 · 0 comments
Open

Unable to use a custom Acceptor #3200

lovasoa opened this issue Nov 22, 2023 · 0 comments

Comments

@lovasoa
Copy link

lovasoa commented Nov 22, 2023

I was trying to make an https server that would auto-generate ssl certificate with TLS-ALPN-01. There is a crate available that implements it: rustls-acme, but it seems impossible to use it with actix-web, because of the limitations in what the HttpServer type exposes.

Expected Behavior

The user can implement the binding between TCP connections and byte streams however they want, without being limited to a list of "officially supported" SSL implementations.

Current Behavior

Currently, the only way to accept connections to an HTTPServer is to use one of these methods:

Looking at their source code, there seems to be some code between them.
And having to support two different versions of rustls independently inside of actix-web itself also seems sub-optimal.

Possible Solution

Define a public Acceptor trait, implement it for openssl's SslAcceptor and rustl's ServerConfig, and maybe on any function that returns a Stream<AsyncRead + AsyncWrite> ?

Context

I want SQLPage to offer HTTPS support with completely transparent certificate management.

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

1 participant