dotnet / dotnet/dotnet-api-docs

Add remark for RsaCng Key export behavior difference

Open
#6,935 1 comment 0 reactions 1 assignee Claimed by @bartonjs View on GitHub
area-System.Security Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

**Issue description**

Issue originally posted at https://github.com/MicrosoftDocs/feedback/issues/2261

Link to article:
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.rsacng?view=netframework-4.6

Problem:
Refer to discussion on:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/10e6cf37-b8e8-497a-9ade-d7af9d9483c6/where-does-the-default-rsacngkeyexportpolicy-come-from?forum=netfxbcl

I found that on .NET Framework v4.6 or before, AllowPlaintextExport option is not passed when creating the key. This option is added as default on .NET v4.6.2 version of the source file.

Keys created without this option would encounter problem when the program try to export the private key after creation.

It would be great if we can add remark to corresponding versions to address this behavior difference.
**Target framework**

- [ ] .NET Core
- [X] .NET Framework v4.6.2+
- [ ] .NET Standard

This is runtime request to document runtime behavior change between versions, so SDK / compiler version is irrelevant.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.