sam.hay
sam.hay

Reputation: 127

qml: Error: SSL Sockets are not supported on this platform

I'm currently trying to get this WebSocket example working. I believe I get it rendering correctly but I get "qml: Error: SSL Sockets are not supported on this platform." When it tries to connect to the WebSocket. Any idea about what I can do to fix this?

I'm using Desktop Qt 5.15.2 MSVC2019 64bit

edit: The code I'm using is one of the built-in examples for Qt: qmlwebsocketclient

Upvotes: 0

Views: 574

Answers (2)

sam.hay
sam.hay

Reputation: 127

Windows doesn't install OpenSSL by default like Linux. I found this the best way of installing OpenSSL to solve the problem.

  1. Make sure OpenSSL toolkit is installed through Qt. This can be done through the Qt Maintenance Tool.
  2. Set the environment variables to that install.
    -Add a new system variable named OPENSSL_CONF with the path to the openssl.cnf file. mine from a default install was C:\Qt\Tools\OpenSSL\Win_x64\openssl.cnf
    -Add the openssl bin to the system variable Path. Mine from a default install was C:\Qt\Tools\OpenSSL\Win_x64\bin

You can check if the path variable has been set correctly by opening a CMD and printing the version with openssl version. This will print correctly even if the OPENSSL_CONF path is wrong, but if correct the error should go away inside Qt.

Upvotes: 0

Parisa.H.R
Parisa.H.R

Reputation: 3908

If your OS is windows you should install OpenSSL.

enter image description here

and also be sure that you were installed OpenSSL libraries

enter image description here

Upvotes: 1

Related Questions