Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Qt for webassembly do not support ssl?

    General and Desktop
    3
    8
    968
    Loading More Posts
    • 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.
    • tham
      tham last edited by

      Using QNetworkAccessManager to post data to a server, when I connect the signal of QSslError, compiler tell me
      "No member named sslErrors in QNetworkReply"

      1 Reply Last reply Reply Quote 0
      • tham
        tham last edited by

        As @sierdzio mentioned, it do not support ssl yet. They mark this as P2 bug, guess I would have a long time cannot use Qt for webassembly to work with aws, unless not the network module.

        1 Reply Last reply Reply Quote 0
        • lorn.potter
          lorn.potter last edited by lorn.potter

          Did you build openssl with emscripten and then configure/compile Qt?
          That said, connecting to an https url should just work without Qt's ssl support

          Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
          Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

          tham 2 Replies Last reply Reply Quote 2
          • tham
            tham @lorn.potter last edited by

            @lorn-potter no, do not intend to compile Qt and openssl for myself, not now, l prefer html, css and js for the project, unless l know they work and able to ship the poc in a few days.

            In the contrary, compile Qt with openssl with em++ do not has any guarantee it will work, if there do not exist any technical issues, l believe Qt team already ship the Qt5.13.1 with ssl support.

            sierdzio 1 Reply Last reply Reply Quote 0
            • sierdzio
              sierdzio Moderators @tham last edited by

              @tham said in Qt for webassembly do not support ssl?:

              if there do not exist any technical issues, l believe Qt team already ship the Qt5.13.1 with ssl support.

              Yeah but still you need to build/ link OpenSSL manually on each platform. That's mostly due to export restrictions attached to OpenSSL library.

              (Z(:^

              tham 2 Replies Last reply Reply Quote 2
              • tham
                tham @sierdzio last edited by

                @sierdzio Thanks, I am totally fine with that :). Compile openssl and compile openssl with Qt are different story.

                1 Reply Last reply Reply Quote 0
                • tham
                  tham @lorn.potter last edited by tham

                  @lorn-potter said in Qt for webassembly do not support ssl?:

                  That said, connecting to an https url should just work without Qt's ssl support

                  Possible solutions I could come up are

                  1. Use emscripten to call the js api and library
                  2. Use the other library to communicate with network

                  Not sure which one could work, compare with the old solutions, the information of wasm are rare, will test solution1 first after I have luxury times

                  1 Reply Last reply Reply Quote 0
                  • tham
                    tham @sierdzio last edited by tham

                    Use emscripten to call the js api and library work.

                    All you need to do are

                    1. include js script in the app_name.html, before the
                    <script type='text/javascript'>
                    
                    1. Use EM_JS to create a c function which called the js libs, I wrap them in the nameless namespace, not sure this is needed or not.

                    2. I do not add the global variable into Module or window object, maybe this matter, or maybe not.

                    Qt for webassembly is an amazing technology, thanks for the efforts.
                    Today we still suffer from huge binary size and immature core functions, hope these issue could become better in the future

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post