首页 购买软件

IE高级配置中支持的SSL/TLS协议对应注册表值

自己编写的,解决tls勾选 下载后右键管理员运行https://yang.lanzoub.com/izXU71dactbc

 

开始运行 输入inetcpl.cpl之后回车

一、手动勾选”Internet选项->高级->安全->使用TLS 1.2″

a7ce829bfe884f6cb0c60c2dd7451428

二、以编程方式勾选”Internet选项->高级->安全->使用TLS 1.2″
1.注册表值SecureProtocols对应的含义
注册表的路径为:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

Key: SecureProtocols

配置选项及对应10进制几个组合为:
SSL2.0 00000008(8)
SSL3.0 00000020(32)
TLS1.0 00000080(128)
TLS1.1 00000200(512)
TLS1.2 00000800(2048)

TLS1.3 00002000(8192)
TLS1.1 TLS1.2 00000a00(2560)
SSL3.0 TLS1.0 000000a0(160) //32+128=160
SSL3.0 TLS1.0 TLS1.1 000002a0(672)
SSL3.0 TLS1.0 TLS1.2 000008a0(2208)
SSL3.0 TLS1.0 TLS1.1 TLS1.2 00000aa0(2720)
SSL2.0 SSL3.0 TLS1.0 TLS1.1 TLS1.2 00000aa8(2728)
2.批处理修正IE SSL协议

REG ADD “HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings” /v SecureProtocols /t REG_DWORD /d 2720 /f

3.代码修改注册表值(C#示例)
需要添加“使用Microsoft.Win32;”引用

static void Main(string[] args)
{
// The name of the key must include a valid root.
const string userRoot = @”HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings”;
const string subkey = “SecureProtocols”;

//get the registry value.
string result = (Registry.GetValue(userRoot, subkey, “Return this default if NoSuchName does not exist”)).ToString();
Console.WriteLine(result);

//Enable TLS 1.0 and TLS 1.2
Registry.SetValue(userRoot, subkey, 2176);

Console.WriteLine(“OK”);
Console.ReadKey();
}

原文链接:https://blog.csdn.net/dong123ohyes/article/details/127983040

自己调试后的完整代码。

using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 勾选tls
{
class Program
{
static void Main(string[] args)
{
//配置选项及对应10进制几个组合为:
//SSL2.0 00000008(8)
//SSL3.0 00000020(32)
//TLS1.0 00000080(128)
//TLS1.1 00000200(512)
//TLS1.2 00000800(2048)

//TLS1.3 00002000(8192)
//TLS1.1 TLS1.2 00000a00(2560)
//SSL3.0 TLS1.0 000000a0(160) //32+128=160
//SSL3.0 TLS1.0 TLS1.1 000002a0(672)
//SSL3.0 TLS1.0 TLS1.2 000008a0(2208)
//SSL3.0 TLS1.0 TLS1.1 TLS1.2 00000aa0(2720)
//SSL2.0 SSL3.0 TLS1.0 TLS1.1 TLS1.2 00000aa8(2728)

Console.WriteLine(“温馨提示:务必请以,右键管理员身份运行,否则不会成功”);
Console.WriteLine(“如果你是右键管理员运行,请忽略本提示!”);
Console.WriteLine(“本程序是勾选SSL3.0 TLS1.0 TLS1.1 TLS1.2″);

// The name of the key must include a valid root.
const string userRoot = @”HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings”;
const string subkey = “SecureProtocols”;

//get the registry value.
string result = (Registry.GetValue(userRoot, subkey, “Return this default if NoSuchName does not exist”)).ToString();
Console.WriteLine(result);

//Enable TLS 1.0 and TLS 1.2
Registry.SetValue(userRoot, subkey, 2720);

Console.WriteLine(“执行完成”);

Console.WriteLine(” ………………….阿弥陀佛………………….\n” +
” _oo0oo_ \n” +
” o8888888o \n” +
” 88\” . \”88 \n” +
” (| -_- |) \n” +
” 0\\ = /0 \n” +
” ___/‘—’\\___ \n” +
” .’ \\| |/ ‘. \n” +
” / \\\\||| : |||// \\ \n” +
” / _||||| -卍-|||||_ \\ \n” +
” | | \\\\\\ – /// | | \n” +
” | \\_| ”\\—/” |_/ | \n” +
” \\ .-\\__ ‘-‘ ___/-. / \n” +
” ___’. .’ /–.–\\ ‘. .’___ \n” +
” .\”\” ‘< ‘.___\\_<|>_/___.’>’ \”\”. \n” +
” | | : ‘- \\‘.;‘\\ _ /’;.’/ – ’ : | | \n” +
” \\ \\ ‘_. \\_ __\\ /__ _/ .-’ / / \n” +
” =====‘-.____‘.___ \\_____/___.-’___.-’===== \n” +
” ‘=—=’ \n” +
” \n” +
“……………..佛祖保佑 ,永无BUG……..”);
Console.ReadKey();
}
}
}

 

评论

评论关闭

备案:吉ICP备13003065号