-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Closed
Copy link
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
Description
In .NET Interactive environment (.NET 7.0.14), QuicConnection.ConnectAsync successful, but in .NET 8 console app, it fails with System.Security.Authentication.AuthenticationException due to RemoteCertificateNameMismatch.
.NET 7 interactive notebook successful
.NET 8 console app exception
Reproduction Steps
Just create a new .NET 8 console app and run the following code:
using System.Net.Quic;
using System.Net.Security;
using System.Net;
using var cts = new CancellationTokenSource(10_000);
await using var connection = await QuicConnection.ConnectAsync(new QuicClientConnectionOptions {
RemoteEndPoint = new DnsEndPoint("unfiltered.adguard-dns.com", 853),
DefaultStreamErrorCode = 0,
DefaultCloseErrorCode = 0,
ClientAuthenticationOptions = new SslClientAuthenticationOptions {
ApplicationProtocols = [new SslApplicationProtocol("doq")]
}
}, cts.Token);
Console.WriteLine("Connected.");Expected behavior
Connect to the unfiltered.adguard-dns.com successful.
Actual behavior
Got exception AuthenticationException due to RemoteCertificateNameMismatch.
Regression?
Works well in VSCode Polyglot Notebooks v1.0.4562010 with .NET 7 (7.0.14) environment.
Known Workarounds
No response
Configuration
.NET 8
Win11 22H2 22621.2715
x64
Other information
No response
Metadata
Metadata
Assignees
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors

