简体   繁体   中英

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. The build is done under Debian wheezy (64bit) and also on a 32bit machine as well. 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". 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).

Another thing, while trying tho start the server under windows7 it's loading the needed openssl dll's (32bit) and it works.

Am I missing something ?

PS Also the QT examples aren't connecting when compiled on 64bit linux machine (sslechoserver & sslechoclient)

Found the issue in QTcpServer::incomingConnection. On QT5.4 is using qintptr as a socketDescriptor. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, qintptr is a typedef for qint32; on a system with 64-bit pointers, qintptr is a typedef for qint64.

This is why it was working on a 32bit and not on a 64bit machine. (pure luck)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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