共用方式為


ServerCertificateSelectionCallback 代理人

定義

選取伺服器安全套接字層 (SSL) 憑證。

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 物件。

hostName
String

用戶端所要求的主機名稱。 如果用戶端不使用 host_name TLS 延伸模組,則 hostName 為空字串。

傳回值

X509Certificate,用於建立 SSL 連線。

備註

伺服器會使用此委派來選取伺服器連接證書。

類別會 SslStream 使用此委派。 類別 SslStream 可用來協助保護客戶端與伺服器之間交換的資訊。

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。

適用於