|
|
@@ -116,9 +116,10 @@ namespace SampleApp
|
|
|
listenOptions.UseHttps((stream, clientHelloInfo, state, cancellationToken) =>
|
|
|
{
|
|
|
// Here you would check the name, select an appropriate cert, and provide a fallback or fail for null names.
|
|
|
- if (clientHelloInfo.ServerName != null && clientHelloInfo.ServerName != "localhost")
|
|
|
+ var serverName = clientHelloInfo.ServerName;
|
|
|
+ if (serverName != null && serverName != "localhost")
|
|
|
{
|
|
|
- throw new AuthenticationException($"The endpoint is not configured for sever name '{clientHelloInfo.ServerName}'.");
|
|
|
+ throw new AuthenticationException($"The endpoint is not configured for server name '{clientHelloInfo.ServerName}'.");
|
|
|
}
|
|
|
|
|
|
return new ValueTask<SslServerAuthenticationOptions>(new SslServerAuthenticationOptions
|