⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Get warning QSslSocket: cannot resolve SSLv2_client_method when using websocket and QtWebkit

  • Hi.

    I want to use websocket and socket.io from a html page which is opened in a QWebPage. Here is what I try to do:

    @<script src="http://localhost:1337/socket.io/socket.io.js" type='text/javascript'></script>
    window.onload = function() {
    // Open a WebSocket to send and receive chat messages on.
    var socket = io.connect("ws://localhost:1337");@

    When I try to use the socket I get the message "QSslSocket: cannot resolve SSLv2_client_method" on the console.

    The same page works in firefox. Is there anyone who has an idea what the problem is? Why is it trying to use a SSL socket when i use "ws://" when I connect?


    Ps, I had to use "_" in the script tag in the fourm post, otherwise it was removed but the fourm Ds.

  • bq. SSLv2_client_method

    Do you have libeay32.dll and ssleay32.dll in the same folder with exe file? looks like it can't load openssl libs.

    bq. Why is it trying to use a SSL socket when i use “ws://” when I connect?

    Maybe the reason is in the socket.io.js? it doesn't even need openssl for ws:// in my programm...

  • Hi, thanks for your reply.

    I'm running this n Linux (Ubuntu) and openssl is installed.

    You might be right about the socket.io.js file. I'll better check for bugs regarding this.

  • SSLv2 may be not compiled into the openssl library. (SSLv3 is the minimum version considered to be secure, some linux distributions configure the openssl library without the SSLv2 methods)

    Also there was a problem locating openssl on recent ubuntu versions if you don't have the dev package installed. See https://bugreports.qt-project.org/browse/QTBUG-24694

  • Yes this may be the problem I'm having since I run Ubuntu 11.10. Haven't had the time to investigate further. Thanks for the tip though!

Log in to reply