zoukankan      html  css  js  c++  java
  • 微信小程序编译时报错:undefined 对应的服务器 TLS 为 TLS 1.0 ,小程序要求的 TLS 版本必须大于等于 1.2 。控制台输入 showRequestInfo() 可以获取更详细信息。

     undefined 对应的服务器 TLS 为 TLS 1.0 ,小程序要求的 TLS 版本必须大于等于 1.2 。控制台输入 showRequestInfo() 可以获取更详细信息。

    解决办法:

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

    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
    

      如果以上还不能解决。通过在开发工具,进行设置配置。配置如下:

     

  • 相关阅读:
    重装系统后texstudio拼写检查不工作
    git bash使用端口转发连接服务器
    YCSB-mapkeeper
    编译thrift外篇-关于默认链接包-(使用mapkeeper运行leveldb成功)
    编译Thrift
    Could not resolve view with name 'sys/login' in servlet with name 'dispatcher'
    Eclipse创建一个Maven Web项目
    Maven安装配置
    使用Maven创建Web应用程序项目
    org.apache.jasper.JasperException: Unable to compile class for JSP:
  • 原文地址:https://www.cnblogs.com/benpao1314/p/14677300.html
Copyright © 2011-2022 走看看