April 12, 2012

shaddack shaddack
Lab Rat
3 posts

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:

  1. <_script_ src="http://localhost:1337/socket.io/socket.io.js" type='text/javascript'></_script_>
  2.         <_script_>
  3.        window.onload = function() {
  4.           // Open a WebSocket to send and receive chat messages on.
  5.           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?

Regards
Daniel

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

4 replies

April 12, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

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.

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…

 Signature 

God is Real unless explicitly declared as Integer.

April 12, 2012

shaddack shaddack
Lab Rat
3 posts

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.

April 19, 2012

Shane Kearns Shane Kearns
Lab Rat
25 posts

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

April 20, 2012

shaddack shaddack
Lab Rat
3 posts

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!

 
  ‹‹ Integrate SIP API with Qt Webkit      Qt webkit fails to load external javascripts ››

You must log in to post a reply. Not a member yet? Register here!