SslStream.NegotiateClientCertificateAsync(CancellationToken) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Negotiates the client certificate on the authenticated connection.

C#
[System.Runtime.Versioning.SupportedOSPlatform("freebsd")]
[System.Runtime.Versioning.SupportedOSPlatform("linux")]
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public virtual System.Threading.Tasks.Task NegotiateClientCertificateAsync(System.Threading.CancellationToken cancellationToken = default);
C#
public virtual System.Threading.Tasks.Task NegotiateClientCertificateAsync(System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

The task object representing the asynchronous operation.

Attributes

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

You can negotiate the client certificate once authentication is successfully processed via one of the AuthenticateAs... methods.

Applies to

Product Versions
.NET 6, 7, 8, 9, 10