ServerCertificateSelectionCallback 代理人

定義

選取伺服器安全通訊端層 (SSL) 憑證。Selects the server Secure Sockets Layer (SSL) certificate.

public delegate System::Security::Cryptography::X509Certificates::X509Certificate ^ ServerCertificateSelectionCallback(System::Object ^ sender, System::String ^ hostName);
public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string? hostName);
public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string hostName);
type ServerCertificateSelectionCallback = delegate of obj * string -> X509Certificate
Public Delegate Function ServerCertificateSelectionCallback(sender As Object, hostName As String) As X509Certificate 

參數

sender
Object

SslStream 物件。A SslStream object.

hostName
String

用戶端所要求的主機名稱。The host name requested by the client. 如果用戶端不使用 host_name TLS 延伸模組,則 hostName 為空字串。If the client doesn't use the host_name TLS extension, the hostName is an empty string.

傳回值

X509Certificate

X509Certificate,用於建立 SSL 連線。An X509Certificate used for establishing an SSL connection.

備註

伺服器會使用這個委派來選取伺服器連接憑證。The server uses this delegate to select a server connection certificate.

類別會使用這個委派 SslStreamThis delegate is used by the SslStream class. SslStream類別是用來協助保護用戶端與伺服器之間交換的資訊。The SslStream class is used to help secure information exchanged between a client and server.

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。Gets an object that represents the method represented by the specified delegate.

適用於