Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Don't expose TrustedCertificatesDirectory() and StartNewTlsSessionContext() to NetFx #113963

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 1 commit into from
Apr 24, 2025

Conversation

steveharter
Copy link
Member

Fixes #113947

Will need to backport to v9 and v8.

@steveharter steveharter self-assigned this Mar 27, 2025
@Copilot Copilot AI review requested due to automatic review settings March 27, 2025 13:16
@ghost
Copy link

ghost commented Mar 27, 2025

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

1 similar comment
@ghost
Copy link

ghost commented Mar 27, 2025

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

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 prevents exposing the TrustedCertificatesDirectory property and StartNewTlsSessionContext method to NetFx by conditionally compiling them for NET targets only.

  • Guard TrustedCertificatesDirectory with #if NET and mark it with the UnsupportedOSPlatformAttribute.
  • Guard StartNewTlsSessionContext with #if NET and mark it accordingly.

Copy link
Contributor

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

@teo-tsirpanis
Copy link
Contributor

That's a breaking change, isn't it?

@steveharter
Copy link
Member Author

That's a breaking change, isn't it?

No. The method was just introduced and is not implemented on .NET Framework.

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

Change looks OK.

It would be nice if we could make API Compat add an additional compatibility tuple for these cases where we don't build for NETFX but expect to be compatible with an assembly in the targeting pack @ViktorHofer

@ViktorHofer
Copy link
Member

If you refer to following placeholder files in a comparison tuple, yes we should support that. This is tracked under dotnet/sdk#18165 and dotnet/sdk#27822 attempted to fix that. Never found time to finish it.

@steveharter steveharter merged commit 235e8aa into dotnet:main Apr 24, 2025
88 of 90 checks passed
@steveharter steveharter deleted the ds113947 branch April 24, 2025 14:41
@steveharter
Copy link
Member Author

/backport to release/9.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/14644505815

@steveharter
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/14648563757

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.

Cannot consume TrustedCertificatesDirectory from netfx app
4 participants