Skip to content

Ignore revocation checking failures on HTTPS tests on OSX #116910

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Jun 23, 2025

This PR applies similar fix as in #22644 to Outerloop HTTPS tests where we check exact certificate validation errors. Additional context is also available at #25872

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 07:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances logging for certificate validation errors in the HttpClientHandler tests by outputting detailed information about each certificate in the chain along with associated error statuses.

  • Added a loop to iterate through all certificate chain elements and output certificate details and status information.
  • Logged overall SSL policy errors at the end of the callback.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 23, 2025
@rzikm
Copy link
Member Author

rzikm commented Jun 23, 2025

/azp run runtime-libraries-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzikm
Copy link
Member Author

rzikm commented Jun 23, 2025

/azp run runtime-libraries-coreclr outerloop-osx

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzikm
Copy link
Member Author

rzikm commented Jun 23, 2025

/azp run runtime-libraries-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzikm
Copy link
Member Author

rzikm commented Jun 23, 2025

/azp run runtime-libraries-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzikm rzikm changed the title [NOMERGE] [NOREVIEW]Log certificate validation errors Ignore revocation checking failures on HTTPS tests on OSX Jun 23, 2025
@rzikm rzikm added area-System.Net.Http and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 23, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@wfurt
Copy link
Member

wfurt commented Jun 23, 2025

are we forcing customers to basically do the same?

@rzikm
Copy link
Member Author

rzikm commented Jun 24, 2025

are we forcing customers to basically do the same?

for customers, the right way to fix this would be disabling certificate revocation checking, but it is true that this might start affecting more people than we originally expected. I am wondering if we should consider different default for OSX.

cc @bartonjs, @blowdart for visibility.

// https://github.com/dotnet/corefx/issues/21922#issuecomment-315555237
X509ChainStatusFlags flags = chain.ChainStatus.Aggregate(X509ChainStatusFlags.NoError, (cur, status) => cur | status.Status);
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) &&
flags == X509ChainStatusFlags.RevocationStatusUnknown &&
Copy link
Member

Choose a reason for hiding this comment

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

If RevocationStatusUnknown is causing failure on macOS, but not on Windows or Linux, then that's a bug in the cert layer.

If it's just that macOS comes back with RevocationStatusUnknown and the others don't... that's not a thing we can really fix. But, you/we could decide that SslStream's default chain policy should say that RevocationStatusUnknown should not be considered as failure. (That'd be ChainPolicy.RevocationFlags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants