×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    113

    How do I establish an HTTPS connection?

    Hey guys,

    Today question is simple...

    As soon as I try to establish a connection with an https server (previously working over http), I get these errors:

    QSslSocket: cannot call unresolved function SSLv3_client_method
    QSslSocket: cannot call unresolved function SSL_CTX_new
    QSslSocket: cannot call unresolved function SSL_library_init
    QSslSocket: cannot call unresolved function ERR_get_error
    QSslSocket: cannot call unresolved function ERR_error_string

    Obviously I need to implement some sort of https handling.

    I've been trying to search the net on this matter and haven't found any clear examples or tutorial.

    I've read about QSslSocket, but implementing such thing would throw all my previous implementation using QNetworkAccessManager away! There has to be a more integrated way to do this...

    Thanks!

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    113

    Re: How do I establish an HTTPS connection?

    I also tried implementing the sslErrors(QNetworkReply*,const QList<QSslError>&)) SIGNAL from QNetworkAccess but it never gets called.

  3. #3
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How do I establish an HTTPS connection?

    When we tried it it "just worked". Note that we didn't use the deprecated QHTTP stuff, though -- used QNetworkAccessManager. Also note that this was on phone and emulator, not simulator.

  4. #4
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    113

    Re: How do I establish an HTTPS connection?

    I tried several things and it ended up working, this is what I did (not sure if I need to do everything or just one of these things):

    - Implemented QNetworkAccess sslError signal with a ignoreSslErrors() to the reply
    - Set the QNetworkRequest instance setSslConfiguration to QSslConfiguration::defaultConfiguartion());
    - Installed OpenSSL on Windows and copied the three dlls to wherever QNetwork4.dll and QNetwork4d.dll where inside NokiaQtSDK.

    Perhaps this will help somebody.

    Best

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How do I establish an HTTPS connection?

    Yeah, you'll need to ignore SSL errors if you don't have the right certificates installed.

  6. #6
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Dublin
    Posts
    240

    Re: How do I establish an HTTPS connection?

    I was successful in making call https://www.google.com in this Example in WinXP.
    All you got to do is keep Open-SSL libraries in correct location as per platform. I chose to install Open-SSL binaries and they went straight into WinXP DLL folder. Don't think of writing new code

Similar Threads

  1. how can I establish a wifi connection?
    By lmyuanhang in forum Symbian
    Replies: 3
    Last Post: 2009-09-18, 07:30
  2. establish connection
    By zenekas in forum Open C/C++
    Replies: 1
    Last Post: 2009-06-18, 04:00
  3. problem with establish connection
    By NickKovach in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-12-22, 01:34
  4. Time to establish connection
    By mshita in forum Mobile Java General
    Replies: 2
    Last Post: 2004-06-11, 14:59
  5. Can not establish the connection via COM1
    By mrvanhieu in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-01-23, 17:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×