Skip to content

Commit 74fbded

Browse files
committed
Port System.Security source comments to Docs
1 parent ce08820 commit 74fbded

File tree

6 files changed

+397
-331
lines changed

6 files changed

+397
-331
lines changed

xml/System.Security.Claims/Claim.xml

Lines changed: 97 additions & 85 deletions
Large diffs are not rendered by default.

xml/System.Security.Claims/ClaimsIdentity.xml

Lines changed: 136 additions & 130 deletions
Large diffs are not rendered by default.

xml/System.Security.Claims/ClaimsPrincipal.xml

Lines changed: 110 additions & 92 deletions
Large diffs are not rendered by default.

xml/System.Security.Cryptography.Pkcs/Pkcs12CertBag.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
<param name="certificateType">The Object Identifier (OID) for the certificate type.</param>
4141
<param name="encodedCertificate">The encoded certificate value.</param>
4242
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> class using the specified certificate type and encoding.</summary>
43-
<remarks>To be added.</remarks>
43+
<remarks>
44+
<format type="text/markdown"><![CDATA[
45+
46+
No validation is done to ensure that the `encodedCertificate` value is correct for the indicated `certificateType`.
47+
48+
Note that for X.509 public-key certificates the correct encoding for a CertBag value is to wrap the DER-encoded certificate in an OCTET STRING.
49+
50+
]]></format>
51+
</remarks>
4452
</Docs>
4553
</Member>
4654
<Member MemberName="EncodedCertificate">

xml/System.Security.Cryptography.Pkcs/Rfc3161TimestampToken.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@
4343
<Docs>
4444
<summary>Gets a Signed Cryptographic Message Syntax (CMS) representation of the RFC3161 timestamp token.</summary>
4545
<returns>The <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> representation of the <see cref="T:System.Security.Cryptography.Pkcs.Rfc3161TimestampToken" />.</returns>
46-
<remarks>To be added.</remarks>
46+
<remarks>
47+
<format type="text/markdown"><![CDATA[
48+
49+
Successive calls to this method return the same object.
50+
51+
The SignedCms class is mutable, but changes to that object are not reflected in the <xref:T:System.Security.Cryptography.Pkcs.Rfc3161TimestampToken> object which produced it.
52+
53+
The value from calling <xref:M:System.Security.Cryptography.Pkcs.SignedCms.Encode> can be interpreted again as an <xref:T:System.Security.Cryptography.Pkcs.Rfc3161TimestampToken> via another call to <xref:M:System.Security.Cryptography.Pkcs.Rfc3161TimestampToken.TryDecode(System.ReadOnlyMemory{System.Byte},System.Security.Cryptography.Pkcs.Rfc3161TimestampToken@,System.Int32@)>.
54+
55+
]]></format>
56+
</remarks>
4757
</Docs>
4858
</Member>
4959
<Member MemberName="TokenInfo">

xml/System.Security.Cryptography.Xml/RSAKeyValue.xml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<Docs>
2525
<summary>Represents the &lt;<see langword="RSAKeyValue" />&gt; element of an XML signature.</summary>
2626
<remarks>
27-
<format type="text/markdown"><![CDATA[
28-
27+
<format type="text/markdown"><![CDATA[
28+
2929
## Remarks
3030
The <xref:System.Security.Cryptography.Xml.RSAKeyValue> class represents the `<RSAKeyValue>` element of an XML signature defined by the XML digital signature specification. The `<RSAKeyValue>` element is the subelement of the `<KeyInfo>` element (represented by the <xref:System.Security.Cryptography.Xml.KeyInfo> class) that describes an <xref:System.Security.Cryptography.RSA> public key. The `<RSAKeyValue>` element contains the public key that corresponds to the private key used to digitally sign a document. A recipient of the document uses the public key to validate the XML signature.
3131
@@ -48,9 +48,9 @@
4848
4949
[!code-cpp[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/CPP/xmldsigdetach.cpp#1)]
5050
[!code-csharp[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/CS/xmldsigdetach.cs#1)]
51-
[!code-vb[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/VB/xmldsigdetach.vb#1)]
52-
53-
]]></format>
51+
[!code-vb[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/VB/xmldsigdetach.vb#1)]
52+
53+
]]></format>
5454
</remarks>
5555
</Docs>
5656
<Members>
@@ -86,12 +86,12 @@
8686
<Docs>
8787
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.RSAKeyValue" /> class with a new randomly generated <see cref="T:System.Security.Cryptography.RSA" /> public key.</summary>
8888
<remarks>
89-
<format type="text/markdown"><![CDATA[
90-
89+
<format type="text/markdown"><![CDATA[
90+
9191
## Remarks
92-
This constructor creates a new instance of the default implementation of <xref:System.Security.Cryptography.RSA> to hold the public key.
93-
94-
]]></format>
92+
This constructor creates a new instance of the default implementation of <xref:System.Security.Cryptography.RSA> to hold the public key.
93+
94+
]]></format>
9595
</remarks>
9696
</Docs>
9797
</Member>
@@ -122,8 +122,8 @@
122122
<param name="key">The instance of an implementation of <see cref="T:System.Security.Cryptography.RSA" /> that holds the public key.</param>
123123
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.RSAKeyValue" /> class with the specified <see cref="T:System.Security.Cryptography.RSA" /> public key.</summary>
124124
<remarks>
125-
<format type="text/markdown"><![CDATA[
126-
125+
<format type="text/markdown"><![CDATA[
126+
127127
## Examples
128128
The following code example demonstrates how to generate and verify an enveloped XML signature using the <xref:System.Security.Cryptography.Xml.RSAKeyValue> object.
129129
@@ -135,9 +135,9 @@
135135
136136
[!code-cpp[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/CPP/xmldsigdetach.cpp#1)]
137137
[!code-csharp[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/CS/xmldsigdetach.cs#1)]
138-
[!code-vb[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/VB/xmldsigdetach.vb#1)]
139-
140-
]]></format>
138+
[!code-vb[System.Security.Cryptography.XML-XMLDsigDetached#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/VB/xmldsigdetach.vb#1)]
139+
140+
]]></format>
141141
</remarks>
142142
</Docs>
143143
</Member>
@@ -168,7 +168,13 @@
168168
<Docs>
169169
<summary>Returns the XML representation of the <see cref="T:System.Security.Cryptography.RSA" /> key clause.</summary>
170170
<returns>The XML representation of the <see cref="T:System.Security.Cryptography.RSA" /> key clause.</returns>
171-
<remarks>To be added.</remarks>
171+
<remarks>
172+
<format type="text/markdown"><![CDATA[
173+
174+
Based upon https://www.w3.org/TR/xmldsig-core/#sec-RSAKeyValue.
175+
176+
]]></format>
177+
</remarks>
172178
</Docs>
173179
</Member>
174180
<Member MemberName="Key">
@@ -198,14 +204,14 @@
198204
<summary>Gets or sets the instance of <see cref="T:System.Security.Cryptography.RSA" /> that holds the public key.</summary>
199205
<value>The instance of <see cref="T:System.Security.Cryptography.RSA" /> that holds the public key.</value>
200206
<remarks>
201-
<format type="text/markdown"><![CDATA[
202-
207+
<format type="text/markdown"><![CDATA[
208+
203209
## Remarks
204210
The <xref:System.Security.Cryptography.Xml.RSAKeyValue.Key%2A> property represents the public key to add to an XML digital signature using the `<Modulus>` subelement and the `<Exponent>` subelement of the `<RSAKeyValue>` element.
205211
206-
For more information about XML digital signatures, see the W3C specification at www.w3.org/TR/xmldsig-core/.
207-
208-
]]></format>
212+
For more information about XML digital signatures, see the W3C specification at www.w3.org/TR/xmldsig-core/.
213+
214+
]]></format>
209215
</remarks>
210216
</Docs>
211217
</Member>
@@ -238,7 +244,13 @@
238244
<Docs>
239245
<param name="value">The XML element from which to load the <see cref="T:System.Security.Cryptography.RSA" /> key clause.</param>
240246
<summary>Loads an <see cref="T:System.Security.Cryptography.RSA" /> key clause from an XML element.</summary>
241-
<remarks>To be added.</remarks>
247+
<remarks>
248+
<format type="text/markdown"><![CDATA[
249+
250+
Based upon https://www.w3.org/TR/xmldsig-core/#sec-RSAKeyValue.
251+
252+
]]></format>
253+
</remarks>
242254
<exception cref="T:System.ArgumentNullException">The <paramref name="value" /> parameter is <see langword="null" />.</exception>
243255
<exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="value" /> parameter is not a valid <see cref="T:System.Security.Cryptography.RSA" /> key clause XML element.</exception>
244256
</Docs>

0 commit comments

Comments
 (0)