简体   繁体   English

64位服务器下的OpenSSL问题,同一32位(QT应用程序)下没有

[英]OpenSSL issue under 64bit server and none under same 32bit (QT app)

After upgrading the QT from 4.8.5 to 5.4.0 we had an issue with the server side. 在将QT从4.8.5升级到5.4.0后,我们遇到了服务器端的问题。 The build is done under Debian wheezy (64bit) and also on a 32bit machine as well. 构建在Debian wheezy(64位)下完成,也在32位机器上完成。 When we start the server on the 32bit machine, using the command openssl s_client -connect xxx.xxx.xxx.xxx:4443 we receive an answer with the certificate, but under the 64bit machine nothing happens only stating "CONNECTED". 当我们在32位机器上启动服务器时,使用命令openssl s_client -connect xxx.xxx.xxx.xxx:4443我们收到证书的答案,但在64位机器下,没有任何事情只发出“已连接”。 Both machines have the openssl 1.0.0e version installed, the QT was installed using the web installer (copied the needed objects directly, so it wasn't compiled on the machines). 两台机器都安装了openssl 1.0.0e版本,QT使用Web安装程序安装(直接复制所需的对象,因此未在机器上编译)。

Another thing, while trying tho start the server under windows7 it's loading the needed openssl dll's (32bit) and it works. 另一件事,当尝试在Windows7下启动服务器时,它正在加载所需的openssl dll(32位)并且它可以工作。

Am I missing something ? 我错过了什么吗?

PS Also the QT examples aren't connecting when compiled on 64bit linux machine (sslechoserver & sslechoclient) PS在64位linux机器上编译时,QT示例也没有连接(sslechoserver&sslechoclient)

Found the issue in QTcpServer::incomingConnection. 在QTcpServer :: incomingConnection中发现了问题。 On QT5.4 is using qintptr as a socketDescriptor. 在QT5.4上使用qintptr作为socketDescriptor。 This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. 保证此类型与Qt支持的所有平台上的指针大小相同。 On a system with 32-bit pointers, qintptr is a typedef for qint32; 在具有32位指针的系统上,qintptr是qint32的typedef; on a system with 64-bit pointers, qintptr is a typedef for qint64. 在具有64位指针的系统上,qintptr是qint64的typedef。

This is why it was working on a 32bit and not on a 64bit machine. 这就是为什么它在32位而不是在64位机器上工作的原因。 (pure luck) (纯粹的运气)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM