Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Error: Protocol "https" is unknown

Error: Protocol "https" is unknown

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 5 Posters 855 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jabille

    @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

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #5
    This post is deleted!
    1 Reply Last reply
    0
    • J jabille

      @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

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #6

      @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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      1
      • SGaistS SGaist

        @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 ?

        J Offline
        J Offline
        jabille
        wrote on last edited by
        #7

        @SGaist Yes. I #include <QSslSocket> and it the code is building properly on my Qt 6.7.3 Kit (Windows) but not on my Qt 5.2.1 Kit (Generates package installed to Linux device).

        jsulmJ 1 Reply Last reply
        0
        • J jabille

          @SGaist Yes. I #include <QSslSocket> and it the code is building properly on my Qt 6.7.3 Kit (Windows) but not on my Qt 5.2.1 Kit (Generates package installed to Linux device).

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #8

          @jabille QSslSocket is available since Qt 4.3.
          Do you have

          QT += network
          

          in your pro file?
          How did you install Qt 5.2.1? Maybe network module is missing in this Qt installation?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by SGaist
            #9

            Beside the question from @jsulm, are you sure that version of Qt was built with OpenSSL support ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jabille
              wrote on last edited by
              #10

              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.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #11

                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.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                J 1 Reply Last reply
                0
                • SGaistS SGaist

                  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.

                  J Offline
                  J Offline
                  jabille
                  wrote on last edited by
                  #12

                  @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.

                  jsulmJ 1 Reply Last reply
                  0
                  • hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote on last edited by
                    #13

                    Also, to verify that your SSL works, you can try to compile and run the Secure Socket Client example app in Qt 5.2.1

                    1 Reply Last reply
                    0
                    • J jabille

                      @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.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #14

                      @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.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved