gpt4 book ai didi

ssl - 如何解锁自签名 SSL 证书?

转载 作者:太空宇宙 更新时间:2023-11-03 13:20:23 24 4
gpt4 key购买 nike

问题:由于“无法联系服务器”,用户无法登录移动应用

调试消息:“类型错误:网络请求失败”

尝试修复:重新启动服务器,验证数据库正在运行并且没有任何变化,重新启动服务器正在运行的虚拟机,我使用 postman 检查了 api。当我运行一个简单的 POST 请求时,我收到以下消息:

There was an error connecting to https://app.something.com/api/Accounts/5076/sometest?filter%5Bwhere%5D%xxxxx%5D=null&access_token=mwVfUBNxxxxxxx5x4A4Y5DktKnTZXeL6CB34MoP.

我得到的其中一个建议是:

Self-signed SSL certificates are being blocked: Fix this by turning off 'SSL certificate verification' in Settings > General

只要我执行了这一步,我就能够发出 POST 请求并且一切似乎都正常。我对这种类型的错误完全陌生。另外,我没有设置这个 app/db/certificates。因此,除了取消阻止自签名 SSL 证书(这似乎是一个非常糟糕的主意)之外,我不确定如何进行。我有哪些选择?

这是检查证书的结果:

depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify error:num=20:unable to get local issuer certificate
verify return:0 poll
errornotBefore=Jan 28 11:54:38 2019 GMT
notAfter=Apr 28 11:54:38 2019 GMT

最佳答案

要么,purchase a signed certificate如果您打算将其公开,则来自 CA。

或者免费选项是使用 Let's Encrypt , 使用此服务,您将获得免费证书,但它们会在相对较短的时间内过期;然而,大多数情况下,您可以运行一个代理,它会在证书过期前自动轮换证书。

第三个选项是install the CA certificate用于将其自签名到您的浏览器。即,就像一家大公司可能会做的那样。

编辑

似乎它可能是一个过期的证书?检查它何时过期:

openssl s_client -showcerts -servername www.stackoverflow.com -connect www.stackoverflow.com:443 </dev/null | openssl x509 -noout -dates

stackoverflow 的两个实例更改为您的域

关于ssl - 如何解锁自签名 SSL 证书?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55912742/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com