Skip to content

ITlsConnectionFeature Methods

Provides access to certificate information for an authenticated TLS connection.

GetRemoteCertificateAsync(CancellationToken)

abstract
public abstract Task<X509Certificate2?> GetRemoteCertificateAsync(CancellationToken cancellationToken)
Asynchronously retrieves the remote endpoint's certificate, if any.

Parameters

cancellationTokenCancellationToken
The cancellation token associated with the request.

Returns

A task which returns the remote endpoint's certificate, or null if none is available.