Qt, gsoap, and SSL

  • I've got a problem that I can't find a solution to no matter what I try.

    What I want to get working:

    • Qt to use gsoap to connect to a web service that uses https

    Summary of what I've done so far:

    From what I captured in wireshark, both apps are communicating with the right server. However, the C# app clearly uses https and get authenticated, while the Qt one uses http and gets rejected. I don't think the problem lies in the gsoap generated files (the soapC.cpp should allow ssl).

    I only installed OpenSSL and haven't done anything with it beyond adding its bin to PATH. How do I get Qt to use SSL?? The posts I found relating to Qt and SSL say to configure Qt and nmake it. Can't I just include some libraries in the compile options? I want to avoid configuring as I installed from the QtSDK binary and have no configure.exe.

    If in the worst case I do have to configure it, what configuration options do I use? The posts I read all recommended different options. And do I need to do anything else after?? All this loosely related information is driving me nuts

    edit: Its definitely due to OpenSSL somehow not being enabled for Qt. I stepped through the stdsoap2 code and it skips over all the OpenSSL parts as they are encased within #ifdef WITH_OPENSSL #endif which is disabled. The question is now, how do I enable it???

  • I'm about to embark on a Qt gSoap project myself, so I'll be watching this thread. My thought as I read your post was; do you need to build the Qt library with "-openssl" or "-openssl-linked"?

  • You need to have Qt configured using openssl option.
    @./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'@

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.