Skip to content

Commit c78326d

Browse files
mairawRon Petrusha
andauthored
add exception info + fix object types in Core (#2865)
* add exception info + fix object types in Core * Apply suggestions from peer review Co-Authored-By: Ron Petrusha <[email protected]>
1 parent 5ed24c8 commit c78326d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xml/System.Security.Cryptography.X509Certificates/X509Certificate2.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@
473473
<param name="context">Contextual information about the source of the stream to be deserialized.</param>
474474
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> class using the specified serialization and stream context information.</summary>
475475
<remarks>To be added.</remarks>
476+
<exception cref="T:System.PlatformNotSupportedException">.NET Core only: In all cases.</exception>
476477
<permission cref="T:System.Security.Permissions.SecurityPermission">for accessing unmanaged code. Security action: <see cref="F:System.Security.Permissions.SecurityAction.InheritanceDemand" />. Associated enumeration: <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" /></permission>
477478
</Docs>
478479
</Member>
@@ -1795,7 +1796,7 @@
17951796
<format type="text/markdown"><![CDATA[
17961797
17971798
## Remarks
1798-
Currently this property supports only RSA or DSA keys, so it returns either an <xref:System.Security.Cryptography.RSACryptoServiceProvider> or a <xref:System.Security.Cryptography.DSACryptoServiceProvider> object. If no private key is associated with the certificate, it returns `null`.
1799+
Currently this property supports only RSA or DSA keys, so it returns either an <xref:System.Security.Cryptography.RSA> or a <xref:System.Security.Cryptography.DSA> object in .NET Core or an <xref:System.Security.Cryptography.RSACryptoServiceProvider> or a <xref:System.Security.Cryptography.DSACryptoServiceProvider> object in .NET Framework. If no private key is associated with the certificate, it returns `null`.
17991800
18001801
> [!WARNING]
18011802
> If you set this property to `null` or to another key without first deleting it, a private key file is left on the disk.
@@ -1818,6 +1819,7 @@
18181819
<exception cref="T:System.NotSupportedException">The key algorithm for this private key is not supported.</exception>
18191820
<exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">The X.509 keys do not match.</exception>
18201821
<exception cref="T:System.ArgumentException">The cryptographic service provider key is <see langword="null" />.</exception>
1822+
<exception cref="T:System.PlatformNotSupportedException">.NET Core only: An attempt was made to set this property.</exception>
18211823
</Docs>
18221824
</Member>
18231825
<Member MemberName="PublicKey">
@@ -2403,4 +2405,4 @@
24032405
</Docs>
24042406
</Member>
24052407
</Members>
2406-
</Type>
2408+
</Type>

0 commit comments

Comments
 (0)