tokio-rs / tls

A collection of Tokio based TLS libraries.
https://tokio.rs
MIT License
253 stars 86 forks source link

Added support for WouldBlock #147

Closed john-sharratt closed 1 year ago

john-sharratt commented 1 year ago

This patch implements a feature needed for ACME - the problem being that some certificates need to be fetched from IO engines (e.g. S3 buckets) or generated via proof of ownership challenges, however rustls uses blocking logic on the certificate resolve method and hence would lock up the thread. This is especially apparent in tokio-rustls which such blocking code would also freeze up the tokio shared thread pool.

The motivations for the choices in this patch are:

The dependent library needs to be upstream before this one: https://github.com/rustls/rustls/pull/1309

djc commented 1 year ago

The tokio-rustls wrapper for Acceptor is called LazyConfigAcceptor, BTW.

john-sharratt commented 1 year ago

Excellent, thanks for the help. Closed