Skip to content
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

API Proposal: export SPKI on ECDiffieHellmanPublicKey #587

Closed
vcsjones opened this issue Dec 5, 2019 · 2 comments · Fixed by #41887
Closed

API Proposal: export SPKI on ECDiffieHellmanPublicKey #587

vcsjones opened this issue Dec 5, 2019 · 2 comments · Fixed by #41887
Labels
api-approved API was approved in API review, it can be implemented area-System.Security
Milestone

Comments

@vcsjones
Copy link
Member

vcsjones commented Dec 5, 2019

Proposal:

namespace System.Security.Cryptography {
    public abstract partial class ECDiffieHellmanPublicKey {
        public virtual bool TryExportSubjectPublicKeyInfo(
            Span<byte> destination,
            out int bytesWritten);

        public virtual byte[] ExportSubjectPublicKeyInfo();
    }
}

In #413 it was noted that the ECDiffieHellmanPublicKey type does not expose {Try}ExportSubjectPublicKeyInfo. This would allow other APIs to return instances of this type instead of ECDiffieHellman with the export faculties.

/cc @bartonjs

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Security untriaged New issue has not been triaged by the area owner labels Dec 5, 2019
@vcsjones vcsjones changed the title API Proposal: export public key on ECDiffieHellmanPublicKey API Proposal: export SPKI on ECDiffieHellmanPublicKey Dec 5, 2019
@bartonjs bartonjs added api-ready-for-review and removed untriaged New issue has not been triaged by the area owner labels Dec 9, 2019
@carlossanlop carlossanlop added api-ready-for-review API is ready for review, it is NOT ready for implementation and removed api-ready-for-review labels Jul 6, 2020
@bartonjs bartonjs added this to the 5.0.0 milestone Jul 8, 2020
@terrajobst terrajobst added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Jul 16, 2020
@terrajobst
Copy link
Member

terrajobst commented Jul 16, 2020

Video

  • Makes sense. The implementation will throw NotSupportedException.
namespace System.Security.Cryptography
{
    public abstract partial class ECDiffieHellmanPublicKey
    {
        public virtual bool TryExportSubjectPublicKeyInfo(Span<byte> destination, out int bytesWritten);
        public virtual byte[] ExportSubjectPublicKeyInfo();
    }
}

@bartonjs
Copy link
Member

Moving the milestone to Future because it's not a commitment for .NET 5. But PRs are welcome.

@bartonjs bartonjs modified the milestones: 5.0.0, Future Jul 21, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants