-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Http/3 client certificates #35308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http/3 client certificates #35308
Conversation
src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs
Outdated
Show resolved
Hide resolved
// httpsOptions.ClientCertificateMode = ClientCertificateMode.AllowCertificate; | ||
// httpsOptions.AllowAnyClientCertificate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left them intentionally for anyone working with client certs.
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3TlsTests.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3TlsTests.cs
Outdated
Show resolved
Hide resolved
{ | ||
httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); | ||
httpsOptions.ClientCertificateMode = mode; | ||
// httpsOptions.AllowAnyClientCertificate(); // The self-signed cert is invalid. Let it fail the default checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to still be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only line that's different from the prior test so I wanted to call it out rather than delete it.
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3TlsTests.cs
Outdated
Show resolved
Hide resolved
// Console.WriteLine("Ready"); | ||
// Console.ReadKey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to still be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, these are useful if you try to debug the Http3SampleApp. You either have to start the client first and then debug the server, or start both with debugging enabled on the server, and this pause lets you wait until the server is ready.
Contributes to #34858
They happy path works well, you can ask for a certificate, validate it, and consume it.
The unhappy path is very unhappy.