Skip to content

HTTP/3: QuicConnectionListener supports ServerOptionsSelectionCallback #49587

Closed
@JamesNK

Description

@JamesNK

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.

Metadata

Metadata

Assignees

Labels

area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions