zoukankan      html  css  js  c++  java
  • 微信小程序 TLS 版本必须大于等于1.2问题解决

    微信小程序  TLS 版本必须大于等于1.2问题解决

    此问题最近在微信小程序开发中,比较常见。

    在解决这个问题之前,我们需要了解一下,当前的系统环境是否支持TLS1.2以上,可以参考一下表格:

    确认系统支持以后,进行一下操作:

    Windows Registry Editor Version 5.00
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocols]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsMulti-Protocol Unified Hello]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsMulti-Protocol Unified HelloClient]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsMulti-Protocol Unified HelloServer]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsPCT 1.0]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsPCT 1.0Client]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsPCT 1.0Server]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 2.0]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 2.0Client]
    "DisabledByDefault"=dword:00000001
    "Enabled"=dword:00000000
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 2.0Server]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 3.0]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 3.0Client]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 3.0Server]
    "Enabled"=dword:00000000
    "DisabledByDefault"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0Client]
    "Enabled"=dword:00000001
    "DisabledByDefault"=dword:00000000
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0Server]
    "Enabled"=dword:00000001
    "DisabledByDefault"=dword:00000000
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.1]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.1Client]
    "DisabledByDefault"=dword:00000000
    "Enabled"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.1Server]
    "DisabledByDefault"=dword:00000000
    "Enabled"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.2]
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.2Client]
    "DisabledByDefault"=dword:00000000
    "Enabled"=dword:00000001
     
    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.2Server]
    "Enabled"=dword:00000001
    "DisabledByDefault"=dword:00000000
    

    将以上代码,保存到一个txt文件,然后修改后缀.reg,双击执行即可,完成这一步后,重启服务器。

  • 相关阅读:
    Python正课38 —— 有参装饰器
    Python正课37 —— 无参装饰器
    Python正课36 —— 闭包函数
    Python正课35 —— 函数对象与函数嵌套
    Python正课34 —— Global与Nonlocal
    Python正课33 —— 名称空间 与 作用域 介绍
    vue中wowjs的使用
    js得到时间戳(10位数)
    腾讯地图使用中,出现了“鉴权失败,请传入正确的key”
    js数组操作大全
  • 原文地址:https://www.cnblogs.com/xzlive/p/10736391.html
Copyright © 2011-2022 走看看