Ssl in application.



  • Hello everyone,

    I am a newbie in Qt and have been working for an application which reads data from https. I got struck with ssl client certification. Someone, please help me to find suitable example for understanding ssl Client cert and implementation. I have no idea exactly about networking like TCP, FTP's. All your suggestions will help me a lot.

    Qt 5.5 VS 2013 on Windows 8.1 machine. Complied OpenSsl 1.01.

    1. Let me know, how can I find that complied version of openssl is working in my application or not?
      2.How to read the client certificate and accept before reading the https data.

    Thanks in advance.
    Gali.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    First thing: how did you install OpenSSL ?

    What is likely happening is that your application can't find the OpenSSL DLLs thus it can't setup secure connections.

    I'm guessing that you are using Qt Creator. If so, go to the Run part of the Project panel and edit the PATH environment variable. Prepend the path to the OpenSSL DLLs and run again your application.



  • Hello Mr. @SGaist ,

    Thanks for replying to question.

    I have installed the openSSL from here.. Its direct .exe file , dowloaded and installed. Then in my project .pro file, I have added the the lib and include path. Like this:
    LIBS += -LC:/gali/OpenSSL-Win32/lib -lubsec
    INCLUDEPATH += C:/gali/OpenSSL-Win32/include
    When I run project, the App does not throw any error from pro file.
    In build Environment , it is like this.

    1. Is my installation directly for .exe from above link is correct way of doing or not? If not, how can I do it alternatively?
    2. When I run application, it does not show any error in profile.So from this, can I assume that OpenSSL is successfully installed and working for my application?
    3. QSSL works under/inside the QNetworkManger or QSSL socket works alone ?
    4. In my application, App connects to Https server and reads the data. I need client certification , reading certifcate and accept it/ show ssl errors/ reject connection.

    Thanks in advance,
    Gali


  • Lifetime Qt Champion

    Did you install a 32bit version of Qt ?

    There's no need to add anything OpenSSL related in your .pro file unless you are building code using OpenSSL. By default Qt will try to load the OpenSSL DLLs at run time. So what you need to do is go to the Run part of the Project panel and add the path to the OpenSSL DLLs to the PATH environment variable (DON'T do it system wide)


Log in to reply
 

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