quininer / tokio-rustls

Asynchronous TLS/SSL streams for Tokio using Rustls.
142 stars 38 forks source link

Can cert_resolver be async? #39

Closed vpzomtrrfrt closed 5 years ago

vpzomtrrfrt commented 5 years ago

My use case involves dynamically selecting a certificate based on SNI. I see ServerConfig has a cert_resolver field, but it appears to be synchronous. Is it possible to do this with a Future instead?

quininer commented 5 years ago

This is unlikely unless rustls provides a poll interface. But I think you can use a method like tokio_threadpool::blocking to increase the threadpool capacity to avoid block other threads.

vpzomtrrfrt commented 5 years ago

That's unfortunate, but I guess it'll work for now

quininer commented 5 years ago

I am closing it now, you can keep track it in https://github.com/ctz/rustls/issues/89.