Qt OpenSSL 问题 - 在某些计算机上被阻止(?)
我编写了一个使用 OpenSSL 的应用程序。从昨天开始,一切都很好。我编译了应用程序并发送给我的朋友。在他的电脑上应用程序可以打开https。我在其他电脑上打开还是不行。所以我把它给了其他朋友,他无法打开https网站。我很困惑,给了其他人,在他的计算机上我的应用程序正在运行。我不明白情况。以前的版本可以正常运行,没有错误。但我运行了以前的版本,它有效,但也不起作用。我关闭了所有防火墙。一切都没有改变。
有什么建议吗?
我们都有 7x64。我在 XP HE 上测试过,它可以工作,但 bou 在 7 x64 上不起作用。在我朋友的计算机上 7 x64 可以工作,但在 XP HE 上不行。 IMO 操作系统没有任何意义。
I write an app i qt which uses OpenSSL. All was alright, since yesterday. I compiled app and sent to my friend. On his computer application can open https. I open on other computer and it doesn't work. So I gave it to other friend and he can't open https websites. I was confused and gave other guy and on his computer my app is working. I don't understand situation. Previous versions worked without bugs. But i ran previous version which worked and it doesn't work too. I turned off all my firewalls. Nothing changed.
Any suggestions?
We all have 7 x64. I tested on XP HE and it works, bou on 7 x64 doesn't work. On my friend's computer 7 x64 works, but on XP HE doesn't works. IMO Operating System hasn't got any mean.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
默认情况下,Qt 不包含 OpenSSL 的实现,但使用已安装到系统中的库。
安装 Win32 OpenSSL 将使其正常工作。
另一种选择是使用 OpenSSL 构建 Qt。一些信息此处。
By default Qt doesn't contain implementation of OpenSSL, but uses libraries already installed into system.
Installing Win32 OpenSSL will make it work.
Another option is to build Qt with OpenSSL. Some info here.
如果您仍然无法解决该错误 - 我刚刚遇到了同样的问题。这似乎是 Windows 计算机上的 CA 证书链的问题。详细信息可以在 https://bugreports.qt-project.org/browse/QTBUG 找到-20012。
这里还有一个小类可以修复 ca 链,这样应用程序中就不会出现错误。
In case you have still no solution to the error - I just ran over the same issue. It seems to be a problem with the CA certficate chain on the Windows computer. The details can be found at https://bugreports.qt-project.org/browse/QTBUG-20012.
Here's also a little class which fixes the ca chain so the error should not occur in the application.
尝试使用
QSslSocket::ignoreSslErrors()
< /a> 方法。我也遇到过这样的问题,使用这个功能为我解决了这些问题。
Try to use
QSslSocket::ignoreSslErrors()
method.I also had such problems and using this function solved them for me.