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)

获取指示指定委托表示的方法的对象。

适用于