Skip to content

Conversation

@scott-xu
Copy link
Collaborator

@scott-xu scott-xu commented Sep 10, 2024

This PR references System.Formats.Asn1 instead of using home-made DerData class.

I'm trying to add PKCS#8 support after this PR. See RFC5208
Contributes to #1090

@Rob-Hague
Copy link
Collaborator

Also delete ObjectIdentifier.cs?

@scott-xu scott-xu marked this pull request as ready for review September 10, 2024 23:38
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'">
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't want/need to reference Microsoft.Bcl.AsyncInterfaces for netstandard2.1. We should have:

net462 and netstandard2.0: AsyncInterfaces, Asn1, BouncyCastle
netstandard2.1: Asn1, BouncyCastle
netN.0: BouncyCastle

Copy link
Collaborator Author

@scott-xu scott-xu Sep 11, 2024

Choose a reason for hiding this comment

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

Just out of curiosity, why Microsoft.Bcl.AsyncInterfaces targets netstandard2.1?

Copy link
Collaborator

Choose a reason for hiding this comment

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

So that it does not result in unnecessary transitive dependencies (like System.Threading.Tasks.Extensions). It is actually just a facade which forwards to the in-box types: https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the Microsoft.Bcl.AsyncInterfaces for netstandard2.1 is just a facade, but System.Formats.Asn1 for net6.0+ contains all types which is confused.
image
image

Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

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

Nice

@Rob-Hague Rob-Hague merged commit f4bf62b into sshnet:develop Sep 11, 2024
@scott-xu scott-xu deleted the bcl-asn1 branch September 12, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants