Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. sslechoserver demo does not work
Forum Updated to NodeBB v4.3 + New Features

sslechoserver demo does not work

Scheduled Pinned Locked Moved General and Desktop
5 Posts 5 Posters 1.0k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    Robert Cohn
    wrote on last edited by
    #1

    Hello -

    This question was posted in the past, but I didn't see a solution. So I'll ask again, and hopefully somebody more knowledgeable than me has solved it since then.

    I built and ran the Qt sslechoserver demo on Windows by loading its PRO project file into Visual Studio with the Qt add-in, setting the appropriate directories to find Qt components, and loading OpenSSL (so that SSL methods would be resolved at runtime). The demo comes up and indicates it's listening on port 1234, as expected.

    The problem is that I cannot make a connection to this server with the supplied WebSocket client, sslechoclient.html. I get the following error when I attempt the connection (the demo and server use: wss://localhost:1234):
    ERROR: undefined
    DISCONNECTED

    I suspect the problem has something to do with the certificate authorization.
    Note that I have had no problem building/running the non-SSL version of this demo (which opens from the client with ws://localhost:1234).

    Any guidance on this would be most appreciated.

    Thanks very much.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pavel Zubaty
      wrote on last edited by
      #2

      Any solution? With Qt 5.5 the problem remains unsolved and only thing I can think about is using some workaround (eg. encrypting message strings or using third-party library for SSL) which doesn't solve the original problem (bug?).

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Matty
        wrote on last edited by
        #3

        I have the same problem here, looking for a fix...

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kevinc
          wrote on last edited by
          #4

          Likely, your build from Qt "Example" source lacks two DLLs essential to an OpenSSL application and not distributed by Qt:

          libeay32.dll
          ssleay32.dll
          

          To get these, you've three options:

          • find them somewhere else on your system, maybe from
          %QTDIR%\Tools\QtCreator\bin
          
          • download binaries from somewhere, maybe through http://docwiki.embarcadero.com/RADStudio/Rio/en/OpenSSL
          • better yet, download source from https://openssl.org/ and build them from that.

          Wherever you find these DLLs, copy them into the directory containing your example executable, then try running it again.

          1 Reply Last reply
          1
          • Edin-ME Offline
            Edin-ME Offline
            Edin-M
            wrote on last edited by
            #5

            What @kevinc said + in my case, I had to copy libcrypto-1_1.dll and libssl-1_1.dll from C:\Qt\Tools\OpenSSL\Win_x86\bin (for me it's 32-bit app, but use 64-bit if you need) over to the .exe folder to be able to run the sslechoserver and sslechoclient examples. Also I had to add error() listener using QOverload otherwise no error shows up but in this listener there is UnsupportedSocketOperationError if there are no DLLs present.

            You can get Qt OpenSSL dlls from the maintenance tool.

            Version: Qt 5.15.1, x86 (32bit).

            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