当前位置:   article > 正文

【解决】小程序要求的 TLS 版本必须大于等于 1.2

小程序要求的 tls 版本必须大于等于 1.2

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

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

来源:微软官方

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

  1. Windows Registry Editor Version 5.00
  2. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]
  3. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello]
  4. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Client]
  5. "Enabled"=dword:00000000
  6. "DisabledByDefault"=dword:00000001
  7. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server]
  8. "Enabled"=dword:00000000
  9. "DisabledByDefault"=dword:00000001
  10. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0]
  11. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client]
  12. "Enabled"=dword:00000000
  13. "DisabledByDefault"=dword:00000001
  14. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server]
  15. "Enabled"=dword:00000000
  16. "DisabledByDefault"=dword:00000001
  17. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]
  18. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
  19. "DisabledByDefault"=dword:00000001
  20. "Enabled"=dword:00000000
  21. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
  22. "Enabled"=dword:00000000
  23. "DisabledByDefault"=dword:00000001
  24. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]
  25. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
  26. "Enabled"=dword:00000000
  27. "DisabledByDefault"=dword:00000001
  28. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
  29. "Enabled"=dword:00000000
  30. "DisabledByDefault"=dword:00000001
  31. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]
  32. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
  33. "Enabled"=dword:00000001
  34. "DisabledByDefault"=dword:00000000
  35. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
  36. "Enabled"=dword:00000001
  37. "DisabledByDefault"=dword:00000000
  38. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1]
  39. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
  40. "DisabledByDefault"=dword:00000000
  41. "Enabled"=dword:00000001
  42. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
  43. "DisabledByDefault"=dword:00000000
  44. "Enabled"=dword:00000001
  45. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]
  46. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
  47. "DisabledByDefault"=dword:00000000
  48. "Enabled"=dword:00000001
  49. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
  50. "Enabled"=dword:00000001
  51. "DisabledByDefault"=dword:00000000

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

转载于:https://my.oschina.net/lichaoqiang/blog/842594

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/624292
推荐阅读
相关标签
  

闽ICP备14008679号