Skip to content

Commit 7459a14

Browse files
Jan JahodaJan Jahoda
andauthored
SslServerAuthenticationOptions - update documentation (#4367)
* SslServerAuthenticationOptions - update documentation * Fix see reference * apply PR comments * apply PR comments * Extend sslApplicationProtocol remark * add default value for ApplicationProtocols * fix closing tag * fix closing tag * apply review commevts * Apply PR comments * remove an article * remove an article Co-authored-by: Jan Jahoda <[email protected]>
1 parent d89c3c4 commit 7459a14

File tree

4 files changed

+63
-29
lines changed

4 files changed

+63
-29
lines changed

xml/System.Net.Security/SslApplicationProtocol.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@
3232
</Attribute>
3333
</Attributes>
3434
<Docs>
35-
<summary>Represents a values of TLS Application protocol.</summary>
35+
<summary>Represents a value of TLS Application protocol.</summary>
3636
<remarks>
3737
<format type="text/markdown"><![CDATA[
3838
3939
## Remarks
40+
41+
This type contains static fields with predefined <xref:System.Net.Security.SslApplicationProtocol> values for HTTP versions.
4042
41-
For list of supported protocols, see [TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids).
42-
43-
This class contains static field with predefined <xref:System.Net.Security.SslApplicationProtocol> values for HTTP versions.
43+
During the handshake, the client sends a list of available ALPN protocols and the server chooses the best match from that list.
44+
45+
For a complete list of supported protocols, see [TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids).
4446
4547
]]></format>
4648
</remarks>

xml/System.Net.Security/SslServerAuthenticationOptions.xml

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@
2323
</Base>
2424
<Interfaces />
2525
<Docs>
26-
<summary>To be added.</summary>
27-
<remarks>To be added.</remarks>
26+
<summary>This struct represents a server authentication property bag for the <see cref="T:System.Net.Security.SslStream" />.</summary>
27+
<remarks>
28+
<format type="text/markdown"><![CDATA[
29+
30+
## Remarks
31+
This property bag is used as argument for <xref:System.Net.Security.SslStream.AuthenticateAsServer%2A>, or <xref:System.Net.Security.SslStream.AuthenticateAsServerAsync%2A>.
32+
33+
]]></format>
34+
</remarks>
2835
</Docs>
2936
<Members>
3037
<Member MemberName=".ctor">
@@ -46,7 +53,7 @@
4653
</AssemblyInfo>
4754
<Parameters />
4855
<Docs>
49-
<summary>To be added.</summary>
56+
<summary>Initializes a new instance of the <see cref="T:System.Net.Security.SslServerAuthenticationOptions" /> class.</summary>
5057
<remarks>To be added.</remarks>
5158
</Docs>
5259
</Member>
@@ -72,8 +79,8 @@
7279
<ReturnType>System.Boolean</ReturnType>
7380
</ReturnValue>
7481
<Docs>
75-
<summary>To be added.</summary>
76-
<value>To be added.</value>
82+
<summary>Gets or sets a value that indicates whether the <see cref="T:System.Net.Security.SslStream" /> should allow SSL renegotiation.</summary>
83+
<value><see langword="true" /> to indicate that the <see cref="T:System.Net.Security.SslStream" /> allow SSL renegotiation; otherwise, <see langword="false" />. The default value is <see langword="true" />.</value>
7784
<remarks>To be added.</remarks>
7885
</Docs>
7986
</Member>
@@ -99,7 +106,7 @@
99106
<ReturnType>System.Collections.Generic.List&lt;System.Net.Security.SslApplicationProtocol&gt;</ReturnType>
100107
</ReturnValue>
101108
<Docs>
102-
<summary>To be added.</summary>
109+
<summary>Gets or sets a list of ALPN protocols.</summary>
103110
<value>To be added.</value>
104111
<remarks>To be added.</remarks>
105112
</Docs>
@@ -126,9 +133,20 @@
126133
<ReturnType>System.Security.Cryptography.X509Certificates.X509RevocationMode</ReturnType>
127134
</ReturnValue>
128135
<Docs>
129-
<summary>To be added.</summary>
130-
<value>To be added.</value>
131-
<remarks>To be added.</remarks>
136+
<summary>Gets or sets the certificate revocation mode for certificate validation.</summary>
137+
<value>One of the values in <see cref="T:System.Security.Cryptography.X509Certificates.X509RevocationMode" />: <see langword="NoCheck" />, <see langword="Online" />, or <see langword="Offline" />. The default is <see langword="Online" />.</value>
138+
<remarks>
139+
<format type="text/markdown"><![CDATA[
140+
141+
## Remarks
142+
When using certificates, the system validates that the client certificate is not revoked, by checking that the client certificate is not in the revoked certificate list. This check can be performed either by checking online or by checking against a cached revocation list. Revocation checking can be turned off by setting this property to <xref:System.Security.Cryptography.X509Certificates.X509RevocationMode.NoCheck>.
143+
144+
For more information, see [Working with Certificates](/dotnet/framework/wcf/feature-details/working-with-certificates).
145+
146+
]]></format>
147+
</remarks>
148+
<exception cref="T:System.ArgumentException">
149+
The value contains an invalid enumeration value.</exception>
132150
</Docs>
133151
</Member>
134152
<Member MemberName="CipherSuitesPolicy">
@@ -179,7 +197,7 @@
179197
<ReturnType>System.Boolean</ReturnType>
180198
</ReturnValue>
181199
<Docs>
182-
<summary>To be added.</summary>
200+
<summary>Gets or sets a value that specifies whether the client is asked for a certificate for authentication. Note that this is only a request -- if no certificate is provided, the server still accepts the connection request.</summary>
183201
<value>To be added.</value>
184202
<remarks>To be added.</remarks>
185203
</Docs>
@@ -206,8 +224,8 @@
206224
<ReturnType>System.Security.Authentication.SslProtocols</ReturnType>
207225
</ReturnValue>
208226
<Docs>
209-
<summary>To be added.</summary>
210-
<value>To be added.</value>
227+
<summary>Gets or sets the <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</summary>
228+
<value>The default value is <see cref="F:System.Security.Authentication.SslProtocols.None" />, which is the recommended value. See <see cref="T:System.Security.Authentication.SslProtocols" /> for more details.</value>
211229
<remarks>To be added.</remarks>
212230
</Docs>
213231
</Member>
@@ -233,9 +251,11 @@
233251
<ReturnType>System.Net.Security.EncryptionPolicy</ReturnType>
234252
</ReturnValue>
235253
<Docs>
236-
<summary>To be added.</summary>
237-
<value>To be added.</value>
254+
<summary>Gets or sets the <see cref="T:System.Net.Security.EncryptionPolicy" />.</summary>
255+
<value>The default value is <see cref="F:System.Net.Security.EncryptionPolicy.RequireEncryption" /></value>
238256
<remarks>To be added.</remarks>
257+
<exception cref="T:System.ArgumentException">
258+
The value contains an invalid enumeration value.</exception>
239259
</Docs>
240260
</Member>
241261
<Member MemberName="RemoteCertificateValidationCallback">
@@ -260,7 +280,7 @@
260280
<ReturnType>System.Net.Security.RemoteCertificateValidationCallback</ReturnType>
261281
</ReturnValue>
262282
<Docs>
263-
<summary>To be added.</summary>
283+
<summary>Gets or sets a <see cref="T:System.Net.Security.RemoteCertificateValidationCallback" /> delegate responsible for custom validating the certificate supplied by the remote party.</summary>
264284
<value>To be added.</value>
265285
<remarks>To be added.</remarks>
266286
</Docs>
@@ -287,7 +307,7 @@
287307
<ReturnType>System.Security.Cryptography.X509Certificates.X509Certificate</ReturnType>
288308
</ReturnValue>
289309
<Docs>
290-
<summary>To be added.</summary>
310+
<summary>Gets or sets the server certificate.</summary>
291311
<value>To be added.</value>
292312
<remarks>To be added.</remarks>
293313
</Docs>
@@ -314,9 +334,16 @@
314334
<ReturnType>System.Net.Security.ServerCertificateSelectionCallback</ReturnType>
315335
</ReturnValue>
316336
<Docs>
317-
<summary>To be added.</summary>
337+
<summary>Gets or sets the <see cref="T:System.Net.Security.ServerCertificateSelectionCallback" /> delegate responsible for the server certificate selection.</summary>
318338
<value>To be added.</value>
319-
<remarks>To be added.</remarks>
339+
<remarks>
340+
<format type="text/markdown"><![CDATA[
341+
342+
## Remarks
343+
During the server connection establishment, the server first uses <xref:System.Net.Security.SslServerAuthenticationOptions.ServerCertificateSelectionCallback> callback. If the delegate is not provided server uses <xref:System.Net.Security.LocalCertificateSelectionCallback> provided as argument of <xref:System.Net.Security.SslStream.%23ctor%2a?displayProperty=nameWithType> (for the .NET Framework compatibility). If none/neither of those callback are provided, the server falls back to <xref:System.Net.Security.SslServerAuthenticationOptions.ServerCertificate>.
344+
345+
]]></format>
346+
</remarks>
320347
</Docs>
321348
</Member>
322349
</Members>

xml/System.Net.Security/SslStream.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
<Docs>
669669
<param name="targetHost">The name of the server that will share this <see cref="T:System.Net.Security.SslStream" />.</param>
670670
<param name="clientCertificates">The <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> that contains client certificates.</param>
671-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
671+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
672672
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
673673
<summary>Called by clients to authenticate the server and optionally the client in a client-server connection. The authentication process uses the specified certificate collection and SSL protocol.</summary>
674674
<remarks>
@@ -925,7 +925,7 @@
925925
<Docs>
926926
<param name="targetHost">The name of the server that will share this <see cref="T:System.Net.Security.SslStream" />.</param>
927927
<param name="clientCertificates">The <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> that contains client certificates.</param>
928-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
928+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
929929
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
930930
<summary>Called by clients to authenticate the server and optionally the client in a client-server connection as an asynchronous operation. The authentication process uses the specified certificate collection and SSL protocol.</summary>
931931
<returns>The task object representing the asynchronous operation.</returns>
@@ -1137,7 +1137,7 @@
11371137
<Docs>
11381138
<param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
11391139
<param name="clientCertificateRequired">A <see cref="T:System.Boolean" /> value that specifies whether the client is asked for a certificate for authentication. Note that this is only a request -- if no certificate is provided, the server still accepts the connection request.</param>
1140-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
1140+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
11411141
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
11421142
<summary>Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificates, requirements and security protocol.</summary>
11431143
<remarks>
@@ -1405,7 +1405,7 @@
14051405
<Docs>
14061406
<param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
14071407
<param name="clientCertificateRequired">A <see cref="T:System.Boolean" /> value that specifies whether the client is asked for a certificate for authentication. Note that this is only a request -- if no certificate is provided, the server still accepts the connection request.</param>
1408-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
1408+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
14091409
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
14101410
<summary>Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificates, requirements and security protocol as an asynchronous operation.</summary>
14111411
<returns>The task object representing the asynchronous operation.</returns>
@@ -1642,7 +1642,7 @@
16421642
<Docs>
16431643
<param name="targetHost">The name of the server that shares this <see cref="T:System.Net.Security.SslStream" />.</param>
16441644
<param name="clientCertificates">The <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> containing client certificates.</param>
1645-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
1645+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
16461646
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
16471647
<param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
16481648
<param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
@@ -1894,7 +1894,7 @@
18941894
<Docs>
18951895
<param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
18961896
<param name="clientCertificateRequired">A <see cref="T:System.Boolean" /> value that specifies whether the client is asked for a certificate for authentication. Note that this is only a request -- if no certificate is provided, the server still accepts the connection request.</param>
1897-
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
1897+
<param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</param>
18981898
<param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
18991899
<param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
19001900
<param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
@@ -4142,7 +4142,7 @@ This property gets the cipher suite that is going to be used in the communicatio
41424142
</ReturnValue>
41434143
<Docs>
41444144
<summary>Gets a value that indicates the security protocol used to authenticate this connection.</summary>
4145-
<value>The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</value>
4145+
<value>The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents protocols used for authentication.</value>
41464146
<remarks>
41474147
<format type="text/markdown"><![CDATA[
41484148

xml/System.Security.Authentication/SslProtocols.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
<summary>Defines the possible versions of <see cref="T:System.Security.Authentication.SslProtocols" />.</summary>
4040
<remarks>
4141
<format type="text/markdown"><![CDATA[
42+
43+
## Remarks
44+
45+
During the handshake, the client sends a list of SSL versions and the server chooses the best matching version from that list.
46+
4247
]]></format>
4348
</remarks>
4449
</Docs>

0 commit comments

Comments
 (0)