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
UnixCertificateManager: implement IsTrusted. #55335
base: main
Are you sure you want to change the base?
Conversation
Consider the certificate trusted when .NET trusts it.
This is to omit the following warning when a development cert has been installed through https://github.com/tmds/linux-dev-certs.
When |
What validation does this perform? Just that the certificates in the chain are available and unexpired? |
Wait, is this check used exclusively to decide whether or not to print that warning? |
As implemented, this check tells us if
That, and there is another call in aspnetcore/src/Tools/dotnet-dev-certs/src/Program.cs Lines 298 to 315 in 08e84a2
I don't have a strong opinion on whether this one should be updated (to no longer special case Linux) or not. |
public override bool IsTrusted(X509Certificate2 certificate) | ||
{ | ||
using X509Chain chain = new X509Chain(); | ||
chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; |
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.
Why disable revocation checking? Perf?
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.
X509Chain
uses Online
as the default and SocketsHttpHandler
uses NoCheck
as the default.
If we don't set this to NoCheck
then verification fails because the local certificates have no online revocation list to check against.
Consider the certificate trusted when .NET trusts it.
@davidfowl ptal.