> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XNetworkingSecurityInformation

> XNetworkingSecurityInformation

# XNetworkingSecurityInformation

定义用于为特定 URL 端点配置 HTTP 堆栈的安全信息。

## 语法

```cpp theme={null}
typedef struct XNetworkingSecurityInformation {
    uint32_t enabledHttpSecurityProtocolFlags;
    size_t thumbprintCount;
    XNetworkingThumbprint* thumbprints;
} XNetworkingSecurityInformation
```

### 成员

*enabledHttpSecurityProtocolFlags*\
类型：uint32\_t

一个标志位掩码，指示 HTTP 请求应针对此 URL 端点限制哪些传输层安全性 (TLS) 协议；应通过调用 `WinHttpSetOption` 将其传递给 `WINHTTP_OPTION_SECURE_PROTOCOLS` WinHTTP 选项。它可以是 `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1`、`WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1`、`WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2` 和 `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3` 的任意组合。

*thumbprintCount*\
类型：size\_t

`thumbprints` 字段所指向的数组中指纹的数量。

*thumbprints*\
类型：[XNetworkingThumbprint](/reference/networking/xnetworking/structs/xnetworkingthumbprint)\*

预期在服务器为此 URL 端点提供的证书链中出现的指纹数组。

## 备注

此结构体描述用于配置 HTTP 堆栈的安全信息。它确定针对特定 URL 端点应限制哪些 TLS 协议以用于 HTTP 请求。可能并不总是存在任何指纹。典型的 Fiddler 用法会有一个根指纹。

## 要求

**头文件：** XNetworking.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念文档

* [WinHTTP 概述](/build/console-features/networking/web-requests/intro-winhttp)

## 另请参阅

[XNetworkingQuerySecurityInformationForUrlAsync](/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync)\
[XNetworkingQuerySecurityInformationForUrlUtf16Async](/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16async)\
[XNetworking](/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingVerifyServerCertificate](/zh-CN/reference/networking/xnetworking/functions/xnetworkingverifyservercertificate.md)
- [XNetworkingQuerySecurityInformationForUrlAsyncResult](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md)
- [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.md)
- [XNetworkingThumbprintType](/zh-CN/reference/networking/xnetworking/enums/xnetworkingthumbprinttype.md)
- [WinHTTP 概述](/zh-CN/build/console-features/networking/web-requests/intro-winhttp.md)
