-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Kestrel Override Client Cert Validation #11423
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
Conversation
Updated after speaking to @halter73 offline |
src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionMiddlewareTests.cs
Outdated
Show resolved
Hide resolved
@@ -76,6 +77,14 @@ public HttpsConnectionAdapterOptions() | |||
/// </summary> | |||
public bool CheckCertificateRevocation { get; set; } | |||
|
|||
/// <summary> | |||
/// Overrides the current <see cref="ClientCertificateValidation"/> callback and allows any client certificate. |
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.
👍 For the doc comment saying exactly what it does, not just the net result.
/// </summary> | ||
public void AllowAnyClientCertificate() | ||
{ | ||
ClientCertificateValidation = (_, __, ___) => true; |
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 wonder when is C#
going to start allowing (_, _, _)
? Maybe that'd be too breaking for reasons I don't fully realize.
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, that's a feature that I definitely want.
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.
@@ -1,4 +1,4 @@ | |||
// Copyright (c) .NET Foundation. All rights reserved. | |||
// Copyright (c) .NET Foundation. All rights reserved. |
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.
Nit: remove diff.
This comment was made automatically. If there is a problem contact [email protected]. I've triaged the above build. I've created/commented on the following issue(s) |
This comment was made automatically. If there is a problem contact [email protected]. I've triaged the above build. I've created/commented on the following issue(s) |
Fixes: #10351
Adding an option to accept any client certificate.
Roast me.