大网数据广告活动
网络与域名解析

Configure secure protocol options for Windows HTTP Services (WinHTTP)

· 52CE 我爱测

This article provides information about how to configure secure protocol options for Windows HTTP Services (WinHTTP).

This how-to guide shows you how to use the DefaultSecureProtocols registry entry to choose which protocols for the Windows HTTP Services (WinHTTP).

The DefaultSecureProtocols registry entry allows you to specify which SSL protocols should be used when the WINHTTP_OPTION_SECURE_PROTOCOLS flag is used. The setting allows applications that were built to use the WinHTTP default flag to be able to use the newer TLS protocols or prevent older SSL based natively without any need for updates to the application.

Prerequisites

Configure DefaultSecureProtocols

Select which architecture type to add and set the DefaultSecureProtocols registry entry:

x86

  1. Open an elevated PowerShell prompt.

  2. To create and set the DefaultSecureProtocols registry key, run the following command and replace {value} with the DefaultSecureProtocols value that you selected from Calculate the value.

    Get-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp" | New-ItemProperty -Name "DefaultSecureProtocols" -Value "{value}"
    
  3. Either reboot the machine or restart whichever services are using WinHTTP.

x64

  1. Open an elevated PowerShell prompt.

  2. To create and set the DefaultSecureProtocols registry key, run the following commands and replace {value} with the DefaultSecureProtocols value that you selected from Calculate the value.

    # Addresses 64-bit applications
    Get-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp" | New-ItemProperty -Name "DefaultSecureProtocols" -Value "{value}"
    
    # Addresses 32-bit applications
    Get-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp" | New-ItemProperty -Name "DefaultSecureProtocols" -Value "{value}"
    
  3. Either reboot the machine or restart whichever services are using WinHTTP.

Note: On x64 based systems, having both registry keys present simultaneously is required to ensure proper addressing for both types of applications.


Next steps

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 03/27/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。