Ssl sockets unsupported error

I am running tornado webserver to securely connect to a network on linux centos 6.6. I am using the Qt / C ++ client to connect using QWebsocket by opening a URL like "wss: //191.23.4.56/etr/job". I get the error, " SSL sockets are not supported on this platform . What is this error about?

+6
tornado qt websocket
source share
1 answer

The error message "SSL sockets are not supported on this platform" is printed by QWebSocket::open() when the wss and QSslSocket::supportsSsl() URL wss return false .

QSslSocket::supportsSsl() static member QSslSocket::supportsSsl() :

Returns true if this platform supports SSL; otherwise returns false. If the platform does not support SSL, the socket will not work during the connection phase.

This is your main problem. Now we need to find out why Qt believes that SSL is not supported by the platform.

If you downloaded Qt as a binary package, the supportsSsl() function will load the required libssl and libcrypto libraries dynamically.

If these libraries cannot be loaded, the supportsSsl() function returns false .

It is possible that libssl not installed on your system. If you can find the library binaries on your system, but they are not loaded by Qt, it is possible that your binary libssl and / or libcrypto incompatible with the binary Qt.

To avoid such problems, you can create your own Qt. For example, there is a new instruction on how to build Qt-5.5.1 . Note the trick with the -openssl-linked configuration switch. This allows you to integrate OpenSSL libraries into Qt5 libraries instead of dynamically loading them at runtime.

+4
source share

All Articles