Skip to content

Commit fbb6104

Browse files
authored
Remove .NET Framework remarks (System.Security.Cryptography) (#12655)
1 parent b1462f8 commit fbb6104

41 files changed

Lines changed: 149 additions & 672 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

xml/System.Security.Cryptography.Pkcs/CmsSigner.xml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,24 +135,8 @@
135135
<Docs>
136136
<param name="parameters">The CSP parameters to describe which signing key to use.</param>
137137
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.CmsSigner" /> class from a persisted key.</summary>
138-
<remarks>
139-
<format type="text/markdown"><![CDATA[
140-
141-
## Remarks
142-
This constructor results in the following default property values:
143-
144-
|Property|Default value|
145-
|--------------|-------------------|
146-
|<xref:System.Security.Cryptography.Pkcs.CmsSigner.SignerIdentifierType*>|<xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType.SubjectKeyIdentifier?displayProperty=nameWithType>|
147-
|<xref:System.Security.Cryptography.Pkcs.CmsSigner.DigestAlgorithm*>|2.16.840.1.101.3.4.2.1 (SHA-256)|
148-
|<xref:System.Security.Cryptography.Pkcs.CmsSigner.IncludeOption*>|<xref:System.Security.Cryptography.X509Certificates.X509IncludeOption.None?displayProperty=nameWithType>|
149-
150-
> [!IMPORTANT]
151-
> This method is only supported on .NET Framework. Its use on .NET Core throws a <xref:System.PlatformNotSupportedException>.
152-
153-
]]></format>
154-
</remarks>
155-
<exception cref="T:System.PlatformNotSupportedException">.NET Core and .NET 5+ only: In all cases.</exception>
138+
<remarks>To be added.</remarks>
139+
<exception cref="T:System.PlatformNotSupportedException">In all cases.</exception>
156140
</Docs>
157141
</Member>
158142
<Member MemberName=".ctor">

xml/System.Security.Cryptography.Pkcs/EnvelopedCms.xml

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@
107107
108108
The default <xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType> for recipients is <xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType.IssuerAndSerialNumber>.
109109
110-
On .NET Framework, the default symmetric encryption algorithm is determined by the version of the .NET Framework that the application executable was built against. Starting with .NET Framework 4.8, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
111-
112-
On .NET Core, the default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
110+
The default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
113111
114112
]]></format>
115113
</remarks>
@@ -155,10 +153,7 @@
155153
156154
The default <xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType> for recipients is <xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType.IssuerAndSerialNumber>.
157155
158-
On .NET Framework, the default symmetric encryption algorithm is determined by the version of the .NET Framework that the application executable was built against. Starting with .NET Framework 4.8, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
159-
160-
On .NET Core, the default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
161-
156+
The default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.
162157
163158
]]></format>
164159
</remarks>
@@ -477,11 +472,6 @@
477472
478473
The <xref:System.Security.Cryptography.Pkcs.EnvelopedCms.Decrypt> method does not search the computer My store if it is inaccessible.
479474
480-
The following permissions are required to access the decryption key on .NET Framework:
481-
482-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
483-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Decrypt?displayProperty=nameWithType>
484-
485475
]]></format>
486476
</remarks>
487477
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
@@ -524,16 +514,7 @@ The following permissions are required to access the decryption key on .NET Fram
524514
<Docs>
525515
<param name="recipientInfo">The recipient info to use for decryption.</param>
526516
<summary>Decrypts the contents of the decoded enveloped CMS/PKCS#7 message via a specified recipient info by searching certificate stores for a matching certificate and key.</summary>
527-
<remarks>
528-
<format type="text/markdown"><![CDATA[
529-
530-
The following permissions are required to access the decryption key on .NET Framework:
531-
532-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
533-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Decrypt?displayProperty=nameWithType>
534-
535-
]]></format>
536-
</remarks>
517+
<remarks>To be added.</remarks>
537518
<exception cref="T:System.ArgumentNullException">The <paramref name="recipientInfo" /> parameter is <see langword="null" />.</exception>
538519
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
539520
<exception cref="T:System.InvalidOperationException">A method call was invalid for the object's current state.</exception>
@@ -575,16 +556,7 @@ The following permissions are required to access the decryption key on .NET Fram
575556
<Docs>
576557
<param name="extraStore">A collection of certificates to use in addition to the certificate stores for finding a recipient certificate and private key.</param>
577558
<summary>Decrypts the contents of the decoded enveloped CMS/PKCS#7 message via any available recipient info by searching certificate stores and a provided collection for a matching certificate and key.</summary>
578-
<remarks>
579-
<format type="text/markdown"><![CDATA[
580-
581-
The following permissions are required to access the decryption key on .NET Framework:
582-
583-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
584-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Decrypt?displayProperty=nameWithType>
585-
586-
]]></format>
587-
</remarks>
559+
<remarks>To be added.</remarks>
588560
<exception cref="T:System.ArgumentNullException">The <paramref name="extraStore" /> parameter was <see langword="null" />.</exception>
589561
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
590562
<exception cref="T:System.InvalidOperationException">A method call was invalid for the object's current state.</exception>
@@ -684,16 +656,7 @@ Unlike the other overloads of `Decrypt`, this overload does not search certifica
684656
<param name="recipientInfo">The recipient info to use for decryption.</param>
685657
<param name="extraStore">A collection of certificates to use in addition to the certificate stores for finding a recipient certificate and private key.</param>
686658
<summary>Decrypts the contents of the decoded enveloped CMS/PKCS#7 message via a specified recipient info by searching certificate stores and a provided collection for a matching certificate and key.</summary>
687-
<remarks>
688-
<format type="text/markdown"><![CDATA[
689-
690-
The following permissions are required to access the decryption key on .NET Framework:
691-
692-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
693-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Decrypt?displayProperty=nameWithType>
694-
695-
]]></format>
696-
</remarks>
659+
<remarks>To be added.</remarks>
697660
<exception cref="T:System.ArgumentNullException">The <paramref name="recipientInfo" /> or <paramref name="extraStore" /> parameter is <see langword="null" />.</exception>
698661
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
699662
<exception cref="T:System.InvalidOperationException">A method call was invalid for the object's current state.</exception>

xml/System.Security.Cryptography.Pkcs/SignedCms.xml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -634,11 +634,6 @@
634634
635635
This method succeeds if <xref:System.Security.Cryptography.Pkcs.SubjectIdentifierType.NoSignature?displayProperty=nameWithType> was provided as the `signerIdentifierType` argument of one of the <xref:System.Security.Cryptography.Pkcs.SignedCms> constructor overloads. Otherwise, it throws an exception.
636636
637-
The following permissions are required to access the signature key on .NET Framework:
638-
639-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
640-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Sign?displayProperty=nameWithType>
641-
642637
]]></format>
643638
</remarks>
644639
<exception cref="T:System.InvalidOperationException">The recipient certificate is not specified.</exception>
@@ -681,11 +676,6 @@ The following permissions are required to access the signature key on .NET Frame
681676
<remarks>
682677
<format type="text/markdown"><![CDATA[
683678
684-
The following permissions are required to access the signature key on .NET Framework:
685-
686-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
687-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Sign?displayProperty=nameWithType>
688-
689679
## Examples
690680
The following example shows the steps to compute a signature on a <xref:System.Security.Cryptography.Pkcs.SignedCms> message with message content that is not detached. In this case, the message content is included in the <xref:System.Security.Cryptography.Pkcs.SignedCms> message.
691681
@@ -737,31 +727,21 @@ The following permissions are required to access the signature key on .NET Frame
737727
</Parameters>
738728
<Docs>
739729
<param name="signer">A <see cref="T:System.Security.Cryptography.Pkcs.CmsSigner" /> object that represents the signer.</param>
740-
<param name="silent">.NET Core and .NET 5+ only: <see langword="true" /> to request opening keys with PIN prompts disabled, where supported; otherwise, <see langword="false" />. In .NET Framework, this parameter is not used and a PIN prompt is always shown, if required.</param>
730+
<param name="silent"><see langword="true" /> to request opening keys with PIN prompts disabled, where supported; otherwise, <see langword="false" />.</param>
741731
<summary>Creates a signature using the specified signer and adds the signature to the CMS/PKCS #7 message. </summary>
742732
<remarks>
743733
<format type="text/markdown"><![CDATA[
744734
745735
## Remarks
746736
747-
.NET Core only: The `silent` parameter has no effect if the <xref:System.Security.Cryptography.Pkcs.CmsSigner.PrivateKey?displayProperty=nameWithType> value is not null. The provided value controls whether or not computing the signature shows a PIN prompt. Even when the <xref:System.Security.Cryptography.Pkcs.CmsSigner.PrivateKey> property is null and the `silent` parameter is set to `true`, some combinations of operating system and signer options can still result in a PIN prompt.
748-
749-
The following permissions are required to display the user interface on .NET Framework:
750-
751-
- <xref:System.Security.Permissions.UIPermissionWindow.SafeTopLevelWindows?displayProperty=nameWithType>
752-
753-
The following permissions are required to access the signature key on .NET Framework:
754-
755-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
756-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Sign?displayProperty=nameWithType>
737+
The `silent` parameter has no effect if the <xref:System.Security.Cryptography.Pkcs.CmsSigner.PrivateKey?displayProperty=nameWithType> value is not null. The provided value controls whether or not computing the signature shows a PIN prompt. Even when the <xref:System.Security.Cryptography.Pkcs.CmsSigner.PrivateKey> property is null and the `silent` parameter is set to `true`, some combinations of operating system and signer options can still result in a PIN prompt.
757738
758739
]]></format>
759740
</remarks>
760741
<exception cref="T:System.ArgumentNullException">
761742
<paramref name="signer" /> is <see langword="null" />.</exception>
762743
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
763-
<exception cref="T:System.InvalidOperationException">.NET Framework only: A signing certificate is not specified.</exception>
764-
<exception cref="T:System.PlatformNotSupportedException">.NET Core and .NET 5+ only: A signing certificate is not specified.</exception>
744+
<exception cref="T:System.PlatformNotSupportedException">A signing certificate is not specified.</exception>
765745
</Docs>
766746
</Member>
767747
<Member MemberName="ContentInfo">

xml/System.Security.Cryptography.Pkcs/SignerInfo.xml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
## Remarks
4646
The signatures represented by the <xref:System.Security.Cryptography.Pkcs.SignerInfo> class can be either over message content or a signature. The latter kind of signature is referred to as a *countersignature*.
4747
48-
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
48+
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
4949
5050
This class does not have a public constructor; therefore, it cannot be publicly instantiated. It is a read-only class accessible from the <xref:System.Security.Cryptography.Pkcs.SignedCms.SignerInfos?displayProperty=nameWithType> property.
5151
@@ -371,7 +371,7 @@ ASN1 corrupted data.</exception>
371371
372372
## Remarks
373373
374-
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
374+
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
375375
376376
This method displays a user interface in which you choose signers for this message. This requires that the current process is running in *user interactive mode*, meaning that the <xref:System.Environment.UserInteractive?displayProperty=nameWithType> property is set to `true`. A process is normally in user interactive mode unless it is a service process or running inside a Web application.
377377
@@ -383,15 +383,6 @@ Signers whose certificates meet the following conditions will be displayed in th
383383
384384
Signer certificates are chosen from the My store.
385385
386-
The following permissions are required to display the user interface on .NET Framework:
387-
388-
- <xref:System.Security.Permissions.UIPermissionWindow.SafeTopLevelWindows?displayProperty=nameWithType>
389-
390-
The following permissions are required to access the signature key on .NET Framework:
391-
392-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
393-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Sign?displayProperty=nameWithType>
394-
395386
]]></format>
396387
</remarks>
397388
<exception cref="T:System.ArgumentNullException">A null reference was passed to a method that does not accept it as a valid argument.</exception>
@@ -437,12 +428,7 @@ The following permissions are required to access the signature key on .NET Frame
437428
438429
## Remarks
439430
440-
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
441-
442-
The following permissions are required to access the signature key on .NET Framework:
443-
444-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Open?displayProperty=nameWithType>
445-
- <xref:System.Security.Permissions.KeyContainerPermissionFlags.Sign?displayProperty=nameWithType>
431+
This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again.
446432
447433
]]></format>
448434
</remarks>

0 commit comments

Comments
 (0)