Skip to content

Commit dc0d883

Browse files
jozkeeRon Petrusha
andcommitted
Adding documentation for new CipherSuitesPolicy, SslStream.NegotiatedCipherSuite and TlsCipherSuites (#2822)
* Adding documentation for new CipherSuitesPolicy, SslStream.NegotiatedCipherSuite and TlsCipherSuite. * Apply suggestions from code review * Adding some changes of my own as well. Co-Authored-By: Maira Wenzel <[email protected]> Co-Authored-By: Jeremy Barton <[email protected]> * Apply suggestions from code review Co-Authored-By: Ron Petrusha <[email protected]>
1 parent da57e7b commit dc0d883

File tree

3 files changed

+391
-350
lines changed

3 files changed

+391
-350
lines changed

xml/System.Net.Security/CipherSuitesPolicy.xml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,21 @@
3939
<Parameter Name="allowedCipherSuites" Type="System.Collections.Generic.IEnumerable&lt;System.Net.Security.TlsCipherSuite&gt;" />
4040
</Parameters>
4141
<Docs>
42-
<param name="allowedCipherSuites">To be added.</param>
43-
<summary>To be added.</summary>
44-
<remarks>To be added.</remarks>
42+
<param name="allowedCipherSuites">The collection of cipher suites allowed in this policy for negotiation.</param>
43+
<summary>Initializes a new instance of the <see cref="T:System.Net.Security.CipherSuitesPolicy" /> class that can be used for client or server authentication.</summary>
44+
<remarks>
45+
<format type="text/markdown"><![CDATA[
46+
> [!NOTE]
47+
> Defining a cipher suite policy on <xref:System.Net.Security.SslStream> authentication will prevent the OS from deciding which are the best cipher suites to negotiate with and requires that you manually check and update this code. We strongly recommend that you avoid using this feature and rely on your constantly updated OS policy.
48+
49+
## Remarks
50+
51+
Unlike the operating system's underlying SSL/TLS implementation, the order of the <xref:System.Net.Security.TlsCipherSuite> elements in `allowedCipherSuites` doesn't guarantee their priority in client-server negotiation. You can only initialize an instance of this class if you're using Linux systems with OpenSSL 1.1.1 or higher or macOS.
52+
53+
54+
]]></format>
55+
</remarks>
56+
<exception cref="T:System.PlatformNotSupportedException">Platform is not a Linux system with OpenSSL 1.1.1 or higher or a macOS.</exception>
4557
</Docs>
4658
</Member>
4759
<Member MemberName="AllowedCipherSuites">
@@ -65,10 +77,21 @@
6577
<ReturnType>System.Collections.Generic.IEnumerable&lt;System.Net.Security.TlsCipherSuite&gt;</ReturnType>
6678
</ReturnValue>
6779
<Docs>
68-
<summary>To be added.</summary>
69-
<value>To be added.</value>
70-
<remarks>To be added.</remarks>
80+
<summary>Gets a subset of valid cipher suites passed into <see cref="M:System.Net.Security.CipherSuitesPolicy.#ctor(System.Collections.Generic.IEnumerable{System.Net.Security.TlsCipherSuite})" /> constructor as a collection of cipher suites allowed in this policy for negotiation.</summary>
81+
<value>The collection of cipher suites allowed in this policy for negotiation.</value>
82+
<remarks>
83+
<format type="text/markdown"><![CDATA[
84+
85+
86+
> [!NOTE]
87+
> Defining a cipher suite policy on <xref:System.Net.Security.SslStream> authentication will prevent the OS from deciding which are the best cipher suites to negotiate with and requires that you manually check and update this code. We strongly recommend that you avoid using this feature and rely on your constantly updated OS policy.
88+
89+
## Remarks
90+
Unlike the operating system's underlying SSL/TLS implementation, the order of the <xref:System.Net.Security.TlsCipherSuite> elements in `allowedCipherSuites` doesn't guarantee their priority in client-server negotiation. You can only initialize an instance of this class if you're using Linux systems with OpenSSL 1.1.1 or higher or macOS.
91+
92+
]]></format>
93+
</remarks>
7194
</Docs>
7295
</Member>
7396
</Members>
74-
</Type>
97+
</Type>

xml/System.Net.Security/SslStream.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,9 +3452,18 @@ Authentication has not occurred.</exception>
34523452
<ReturnType>System.Net.Security.TlsCipherSuite</ReturnType>
34533453
</ReturnValue>
34543454
<Docs>
3455-
<summary>To be added.</summary>
3456-
<value>To be added.</value>
3457-
<remarks>To be added.</remarks>
3455+
<summary>Gets the cipher suite which was negotiated for this connection.</summary>
3456+
<value>One of the enumeration values that identifies the cipher suite which was negotiated for this connection.</value>
3457+
<remarks>
3458+
<format type="text/markdown"><![CDATA[
3459+
3460+
## Remarks
3461+
3462+
This property gets the cipher suite that is going to be used in the communication between a client and server by the underlying SSL/TLS implementation. It is only available after a successful call to <xref:System.Net.Security.SslStream.AuthenticateAsServer%2A> or <xref:System.Net.Security.SslStream.AuthenticateAsClient%2A>.
3463+
3464+
]]></format>
3465+
</remarks>
3466+
<exception cref="T:System.InvalidOperationException">The property was accessed before the completion of the authentication process or the authentication process failed.</exception>
34583467
</Docs>
34593468
</Member>
34603469
<Member MemberName="Position">

0 commit comments

Comments
 (0)