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. Qt, gsoap, and SSL
Qt 6.11 is out! See what's new in the release blog

Qt, gsoap, and SSL

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 5.0k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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:

    • Followed "this guide":http://developer.qt.nokia.com/wiki/How_to_use_gSOAP_with_Qt_for_Web_Service_Client and got the basic gsoap examples to work on Qt
    • Installed OpenSSL
    • Created a simple program in VS2010 C#, added the same web service, and successfully connects
    • Used wireshark to capture packets sent by both my Qt and C# app

    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???

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      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"?

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yogesh
        wrote on last edited by
        #3

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

        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