Skip to content

Commit 25fa174

Browse files
Jan JahodaJan Jahoda
andauthored
Add SslStream missing API documentation (#4760)
* SslStream add missing API documentation * Fix reference Co-authored-by: Jan Jahoda <[email protected]>
1 parent 09725fb commit 25fa174

File tree

1 file changed

+66
-8
lines changed

1 file changed

+66
-8
lines changed

xml/System.Net.Security/SslStream.xml

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,33 @@
545545
<Parameter Name="sslClientAuthenticationOptions" Type="System.Net.Security.SslClientAuthenticationOptions" Index="0" FrameworkAlternate="net-5.0" />
546546
</Parameters>
547547
<Docs>
548-
<param name="sslClientAuthenticationOptions">To be added.</param>
549-
<summary>To be added.</summary>
550-
<remarks>To be added.</remarks>
548+
<param name="sslClientAuthenticationOptions">The property bag for the SSL connection.</param>
549+
<summary>Called by clients to authenticate the server and optionally the client in a client-server connection.</summary>
550+
<remarks>
551+
<format type="text/markdown"><![CDATA[
552+
553+
## Remarks
554+
[!INCLUDE[sslprotocols-none](~/includes/sslprotocols-none-md.md)] No client certificates are used in the authentication. The certificate revocation list is not checked during authentication. The value specified for `targetHost` must match the name on the server's certificate.
555+
556+
When authentication succeeds, you must check the <xref:System.Net.Security.SslStream.IsEncrypted%2A> and <xref:System.Net.Security.SslStream.IsSigned%2A> properties to determine what security services are used by the <xref:System.Net.Security.SslStream>. Check the <xref:System.Net.Security.SslStream.IsMutuallyAuthenticated%2A> property to determine whether mutual authentication occurred.
557+
558+
If the authentication fails, you receive a <xref:System.Security.Authentication.AuthenticationException>, and this <xref:System.Net.Security.SslStream> is no longer useable. You should close this object and remove all references to it so that it can be collected by the garbage collector.
559+
560+
]]></format>
561+
</remarks>
562+
<exception cref="T:System.ArgumentNullException">
563+
<paramref name="targetHost" /> is <see langword="null" />.</exception>
564+
<exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
565+
<exception cref="T:System.InvalidOperationException">Authentication has already occurred.
566+
567+
-or-
568+
569+
Server authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.
570+
571+
-or-
572+
573+
Authentication is already in progress.</exception>
574+
<exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
551575
</Docs>
552576
</Member>
553577
<Member MemberName="AuthenticateAsClient">
@@ -1025,9 +1049,34 @@
10251049
<Parameter Name="sslServerAuthenticationOptions" Type="System.Net.Security.SslServerAuthenticationOptions" Index="0" FrameworkAlternate="net-5.0" />
10261050
</Parameters>
10271051
<Docs>
1028-
<param name="sslServerAuthenticationOptions">To be added.</param>
1029-
<summary>To be added.</summary>
1030-
<remarks>To be added.</remarks>
1052+
<param name="sslServerAuthenticationOptions">The property bag for the SSL connection.</param>
1053+
<summary>Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificate.</summary>
1054+
<remarks>
1055+
<format type="text/markdown"><![CDATA[
1056+
1057+
## Remarks
1058+
[!INCLUDE[sslprotocols-none](~/includes/sslprotocols-none-md.md)] The certificate revocation list is not checked during authentication. The client is not required to provide a certificate for authentication.
1059+
1060+
This method blocks until the operation completes. To prevent blocking until the operation completes, use one of the <xref:System.Net.Security.SslStream.BeginAuthenticateAsServer%2A> method overloads.
1061+
1062+
If the authentication fails, you receive a <xref:System.Security.Authentication.AuthenticationException>, and this <xref:System.Net.Security.SslStream> is no longer useable. You should close this object and remove all references to it so that it can be collected by the garbage collector.
1063+
1064+
]]></format>
1065+
</remarks>
1066+
<exception cref="T:System.ArgumentNullException">
1067+
<paramref name="serverCertificate" /> is <see langword="null" />.</exception>
1068+
<exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
1069+
<exception cref="T:System.InvalidOperationException">Authentication has already occurred.
1070+
1071+
-or-
1072+
1073+
Client authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.
1074+
1075+
-or-
1076+
1077+
Authentication is already in progress.</exception>
1078+
<exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
1079+
<exception cref="T:System.PlatformNotSupportedException">The <see cref="Overload:System.Net.Security.SslStream.AuthenticateAsServer" /> method is not supported on Windows 95, Windows 98, or Windows Millennium.</exception>
10311080
</Docs>
10321081
</Member>
10331082
<Member MemberName="AuthenticateAsServer">
@@ -2959,8 +3008,17 @@ Authentication has not occurred.</exception>
29593008
</ReturnValue>
29603009
<Parameters />
29613010
<Docs>
2962-
<summary>To be added.</summary>
2963-
<remarks>To be added.</remarks>
3011+
<summary>Releases all resources used by the <see cref="T:System.Net.Security.SslStream" />.</summary>
3012+
<remarks>
3013+
<format type="text/markdown"><![CDATA[
3014+
3015+
## Remarks
3016+
This method overrides <xref:System.Object.Finalize%2A?displayProperty=nameWithType>. Application code should not call this method; an object's <xref:System.Object.Finalize%2A> method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the <xref:System.GC.SuppressFinalize%2A?displayProperty=nameWithType> method.
3017+
3018+
For more information about using the Finalize method, see [Finalize Methods and Destructors](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).
3019+
3020+
]]></format>
3021+
</remarks>
29643022
</Docs>
29653023
</Member>
29663024
<Member MemberName="Flush">

0 commit comments

Comments
 (0)