Skip to content

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

Merged
merged 9 commits into from
Jun 21, 2019

Conversation

mikaelm12
Copy link
Contributor

Fixes: #10351

Adding an option to accept any client certificate.

Roast me.

@mikaelm12
Copy link
Contributor Author

Updated after speaking to @halter73 offline

@@ -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.
Copy link
Member

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;
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove diff.

@mikaelm12
Copy link
Contributor Author

@aspnet-hello
Copy link

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)
https://github.com/aspnet/AspNetCore-Internal/issues/2314

@mikaelm12
Copy link
Contributor Author

@aspnet-hello
Copy link

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)
https://github.com/aspnet/AspNetCore-Internal/issues/2704

@mikaelm12 mikaelm12 merged commit e95c3a0 into master Jun 21, 2019
@ghost ghost deleted the mikaelm12/KestrelCertValidation branch June 21, 2019 00:37
@amcasey amcasey added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to disable client cert validation for Kestrel
8 participants