Closed
Description
ASP.NET Core allows you to configure a callback that creates SslServerAuthenticationOptions
when a TLS handshake happens. This is done using the ServerOptionsSelectionCallback delegate.
Example use:
serverOptions.ListenLocalhost(5001, listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http3;
listenOptions.UseHttps((SslStream stream, SslClientHelloInfo clientHelloInfo, object state, CancellationToken cancellationToken) =>
{
return ValueTask.FromResult((new SslServerAuthenticationOptions()));
}, state: null);
});
Does this callback make sense with QUIC? SslStream would be null, but SslClientHelloInfo and state could still be used to customize auth options with QUIC.