關於微信小程序開發環境蘋果IOS真機預覽報SSL協議錯誤問題解決方案

                          微信小程序開發環境蘋果IOS真機預覽報SSL協議錯誤問題

原文來自:https://blog.csdn.net/qq_27626333/article/details/53635564小程序

                  https://www.wandouip.com/t5i353272/windows

     緣由:新版開發者工具增長了https檢查功能;可以使用此功能直接檢查排查ssl協議版本問題: 微信小程序

                可能緣由:0:後臺域名沒有配置
                                  1:域名不支持https
                                  2:沒有重啓工具;
                                  3:域名沒有備案,或是備案後不足24小時;備案未生效;感謝@小樹提供的案例 
                                  4:ssl協議有問題:小程序須要TLS 版本支持1.2及如下版本,windows系統至少要2008R2以上,才能支持                                          1.0 1.1  1.2 ,少一個版本不支持都不行。服務器

一、在windows Server 2008 R2 and Windows 7服務器註冊表更改微信

     1)在命令行輸入cmd位置輸入PowerShell點擊回車。app

     2)分別輸入命令:ide

           md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2"工具

           md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server"ui

           md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"spa

    3)設置屬性及值

          new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS                      1.2\Server" -name "Enabled" -value 1 -PropertyType "DWord"

          new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS                      1.2\Server" -name "DisabledByDefault" -value 0 -PropertyType "DWord"

          new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS                      1.2\Client" -name "Enabled" -value 1 -PropertyType "DWord"

          new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS                      1.2\Client" -name "DisabledByDefault" -value 0 -PropertyType "DWord"

     4)經過命令:regedit查看註冊表是否建立成功

            HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols

         

    5)重啓服務器。

二、小程序接口必須是Https開頭的網址

相關文章
相關標籤/搜索