语言

ITlsConnectionFeature.TryGetChannelBindingBytes 方法

定义

尝试检索从当前连接请求 kind 的 RFC 5929 TLS 通道绑定令牌(CBT)字节。

public virtual bool TryGetChannelBindingBytes(System.Security.Authentication.ExtendedProtection.ChannelBindingKind kind, out ReadOnlyMemory<byte> channelBindingToken);
abstract member TryGetChannelBindingBytes : System.Security.Authentication.ExtendedProtection.ChannelBindingKind * ReadOnlyMemory -> bool
override this.TryGetChannelBindingBytes : System.Security.Authentication.ExtendedProtection.ChannelBindingKind * ReadOnlyMemory -> bool
Public Overridable Function TryGetChannelBindingBytes (kind As ChannelBindingKind, ByRef channelBindingToken As ReadOnlyMemory(Of Byte)) As Boolean

参数

kind
ChannelBindingKind

要检索的通道绑定的类型。

channelBindingToken
ReadOnlyMemory<Byte>

此方法返回 true时,包含通道绑定令牌字节;否则为空 ReadOnlyMemory<T>。

返回

true 如果请求的通道绑定可用,则为 false 否则(例如:连接不是 TLS、服务器不支持请求 kind 的连接,或者服务器配置中未启用通道绑定)。

注解

通道绑定令牌允许通道内身份验证协议(如通过 HTTPS 协商的 Kerberos 或 NTLM)以加密方式绑定到基础 TLS 通道,从而缓解身份验证中继攻击。 有关Windows使用模型,请参阅https://datatracker.ietf.org/doc/html/rfc5929规范和Microsoft的“针对身份验证的扩展保护”文档。

适用于