Edit

Share via


ServerCertificateSelectionCallback Delegate

Definition

Selects the server Secure Sockets Layer (SSL) certificate.

C#
public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string? hostName);
C#
public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string hostName);

Parameters

sender
Object

A SslStream object.

hostName
String

The host name requested by the client. If the client doesn't use the host_name TLS extension, the hostName is an empty string.

Return Value

An X509Certificate used for establishing an SSL connection.

Remarks

The server uses this delegate to select a server connection certificate.

This delegate is used by the SslStream class. The SslStream class is used to help secure information exchanged between a client and server.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1