Skip to content

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

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