Closed dvtkrlbs closed 1 year ago
Take a look at RustlsConfig::from_config
it might just work for you.
If you want to implement Accept
trait I suggest using BoxFuture
as Future
return type. Then you can return a normal async block like Box::pin(async move {})
.
My use case is I need to use different server configs based on the SNI value (multiple domains each with different certificates and client certificate authentication requirements). Rustls offers an acceptor for this use case. I can see that there is an Accept trait for similiar use case. However looking at the code the default RustlsAcceptor uses a RustlsAcceptorFuture which actually setups the rustls. Should I make my own Acceptor if so do I need to replicate the behaviour of RustlsAcceptorFuture ?