关于微信小程序开发环境苹果IOS真机预览报SSL协议错误问题解决方案
<h2><strong> 微信小程序开发环境苹果IOS真机预览报SSL协议错误问题</strong></h2><p>原文来自:https://blog.csdn.net/qq_27626333/article/details/53635564</p>
<p> https://www.wandouip.com/t5i353272/</p>
<p><strong> </strong>原因:新版开发者工具增加了https检查功能;可使用此功能直接检查排查ssl协议版本问题: </p>
<p> 可能原因:0:后台域名没有配置<br> 1:域名不支持https<br> 2:没有重启工具;<br> 3:域名没有备案,或是备案后不足24小时;备案未生效;感谢@小树提供的案例 <br> 4:ssl协议有问题:小程序需要TLS 版本支持1.2及以下版本,windows系统至少要2008R2以上,才能支持 1.0 1.1 1.2 ,少一个版本不支持都不行。</p>
<p><strong>1、在windows Server 2008 R2 and Windows 7服务器注册表更改</strong></p>
<p> 1)在命令行输入cmd位置输入PowerShell点击回车。</p>
<p> 2)分别输入命令:</p>
<p> md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2"</p>
<p> md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server"</p>
<p> md "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"</p>
<p> 3)设置属性及值</p>
<p> new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -name "Enabled" -value 1 -PropertyType "DWord"</p>
<p> new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -name "DisabledByDefault" -value 0 -PropertyType "DWord"</p>
<p> new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -name "Enabled" -value 1 -PropertyType "DWord"</p>
<p> new-itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -name "DisabledByDefault" -value 0 -PropertyType "DWord"</p>
<p> 4)通过命令:regedit查看注册表是否创建成功</p>
<p> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols</p>
<p> <span class="cke_widget_wrapper cke_widget_inline cke_widget_image cke_image_nocaption cke_widget_selected" data-cke-widget-wrapper="1" data-cke-filter="off" data-cke-display-name="图像" data-cke-widget-id="0"><img class="has cke_widget_element lazyload" alt="" width="179" height="88" src="https://img-blog.csdnimg.cn/20190730134633590.png" data-cke-widget-data="{&quot;hasCaption&quot;:false,&quot;src&quot;:&quot;https://img-blog.csdnimg.cn/20190730134633590.png&quot;,&quot;alt&quot;:&quot;&quot;,&quot;width&quot;:&quot;179&quot;,&quot;height&quot;:&quot;88&quot;,&quot;lock&quot;:true,&quot;align&quot;:&quot;none&quot;,&quot;classes&quot;:{&quot;has&quot;:1}}" data-cke-widget-upcasted="1" data-cke-widget-keep-attr="0" data-widget="image" data-src="https://img-blog.csdnimg.cn/20190730134633590.png"><span class="cke_reset cke_widget_drag_handler_container"><img class="cke_reset cke_widget_drag_handler lazyload" title="点击并拖拽以移动" alt="" width="15" height="15" data-cke-widget-drag-handler="1" data-src="https://img2020.cnblogs.com/blog/509777/202107/509777-20210714101010919-146249554.gif"><span class="cke_image_resizer" title="点击并拖拽以改变尺寸"></span></span></span></p>
<p> 5)重启服务器。</p>
<p><strong>2、小程序接口必须是Https开头的网址</strong></p>
<p> </p>
<p><br> </p><br><br>
来源:https://www.cnblogs.com/fyshao/p/11269615.html
頁:
[1]