Edge
4.6.2
4.7.1
NotPlanned
CngLightup (used in several higher-level crypto apis, such as xref:System.Security.Cryptography.Xml.EncryptedXml?displayProperty=nameWithType) and xref:System.Security.Cryptography.RSACng?displayProperty=nameWithType in some cases rely on full trust. These include P/Invokes without asserting xref:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode?displayProperty=nameWithType permissions, and code paths where xref:System.Security.Cryptography.CngKey?displayProperty=nameWithType has permission demands for xref:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode?displayProperty=nameWithType. Starting with the .NET Framework 4.6.2, CngLightup was used to switch to xref:System.Security.Cryptography.RSACng?displayProperty=nameWithType wherever possible. As a result, partial trust apps that successfully used xref:System.Security.Cryptography.Xml.EncryptedXml?displayProperty=nameWithType began to fail and throw xref:System.Security.SecurityException exceptions.
This change adds the required asserts so that all functions using CngLightup have the required permissions.
- Quirked
- Build-time break
If this change in the .NET Framework 4.6.2 has negatively impacted your partial trust apps, upgrade to the .NET Framework 4.7.1.
M:System.Security.Cryptography.DSACng.#ctor(System.Security.Cryptography.CngKey)P:System.Security.Cryptography.DSACng.KeyP:System.Security.Cryptography.DSACng.LegalKeySizesM:System.Security.Cryptography.DSACng.CreateSignature(System.Byte[])M:System.Security.Cryptography.DSACng.VerifySignature(System.Byte[],System.Byte[])M:System.Security.Cryptography.RSACng.#ctor(System.Security.Cryptography.CngKey)P:System.Security.Cryptography.RSACng.KeyM:System.Security.Cryptography.RSACng.Decrypt(System.Byte[],System.Security.Cryptography.RSAEncryptionPadding)M:System.Security.Cryptography.RSACng.SignHash(System.Byte[],System.Security.Cryptography.HashAlgorithmName,System.Security.Cryptography.RSASignaturePadding)
Security