Error: Protocol "https" is unknown
-
@jabille said in Error: Protocol "https" is unknown:
@Ronel_qtmaster @SGaist I don't think QSslSocket::supportsSsl() is supported in Qt 5.2.1. I am getting an error on this line.
Error is: Use of undeclared identifier QSslSocket
As silly as it may sound: did you include the proper header ?
-
Yes, I also have QT += network. I can confirm that network module is there.
I am able to get a proper response for a QNetworkRequest in 5.2.1 but only in http. If I set the url to https, I get the error: Protocol https is unknown. QNetworkAccessManager supportedSchemes() also does not list https.How do I check if it has OpenSSL support other than QSslSocket::supportsSsl()? The thing is that the qt5.2.1-arm-linux came from the device vendor. It is included in their SDK. So, they might be some things that are missing.
Also, sorry if I am replying to both of you at once. I can only post every 600 seconds as a newbie here.
-
You have the answer: the class is not available so it was not built with OpenSSL support.
You have to check with your vendor.
On that note, seeing the version of Qt, the versions of OpenSSL supported at that time are also now obsolete so I would highly recommend considering porting to a more recent version of Qt.
-
@SGaist I see. I'll talk to the vendor regarding this.
When I tried to copy the path of the #include <QSslSocket>, I can see that it is in the C:\NPT_SDK\Linux\Core\third-party\qt5.2.1-arm-linux\include\QtNetwork and inside qsslsocket.h there is a flag QT_NO_SSL. Maybe that is why it is disabled? I have no clue how that is set or where it's from. -
@jabille said in Error: Protocol "https" is unknown:
Maybe that is why it is disabled?
No, it is there because Qt was built without SSL support. You need a Qt build with SSL support.