PDA

View Full Version : Configuring/Linking OpenSSL to Qt 4 in Ubuntu



shino14
7th May 2015, 08:57
Hi I'm new here,

I created qt project that will use any url. It works in http, but i'm stuck in https, I tried research and googling the issue about https, there are bunch of things about it such as downloading the OpenSSL and then recompiling, configuring, linking whatever the Qt itself and I'm so confuse for the information :confused: . I need a bit of step by step proceedure in installing/configuring/linking OpenSSL to Qt so that i can use https. Is someone there can provide me detailed procedure?

Thanks.. sorry for my English :o

wysota
7th May 2015, 09:38
Did you build Qt yourself or are you using a pre-built binary release?

shino14
7th May 2015, 09:45
I'm using a pre-built binary release. What do you mean by build Qt by myself? Do you mean configuring and installing Qt through terminal commands?

wysota
7th May 2015, 09:47
I'm using a pre-built binary release.
Then just have OpenSSL in case of Linux or equivalent in case of Windows available in your system and Qt will pick that up.


What do you mean by build Qt by myself? Do you mean configuring and installing Qt through terminal commands?

Configuring, building and installing.

shino14
7th May 2015, 10:01
Thanks for that,

I've already installed OpenSSL on default location and i don't know what to do next.
I've just read about CONFIG += -openssl-linked but it doesn't work. Do i need to include the libraries of OpenSSL to .pro file?

wysota
7th May 2015, 10:03
I've already installed OpenSSL on default location and i don't know what to do next.
You don't have to do anything else.


I've just read about CONFIG += -openssl-linked but it doesn't work.
There is no such option for CONFIG. The option you mention is for building Qt.


Do i need to include the libraries of OpenSSL to .pro file?
No.

shino14
7th May 2015, 10:19
Ok, that start make sense to me,

By the way I installed Qt using an executable file: Qt_SDK_Lin32_offline_v1_1_2_en.run.
Let say i want to reinstall it again and i want to use building Qt based on what you've mentioned earlier. Can you give procedure steps of configuring, building and installing Qt.? :)

Thanks.

wysota
7th May 2015, 10:36
What do you mean by "use building Qt"?

shino14
7th May 2015, 10:42
build Qt by myself you said, configuring, building and installing. :)

wysota
7th May 2015, 12:17
I think you are confusing some terms. There is no "reinstall" if you want to "configure, build and install". What is the reason you want to build Qt yourself?

shino14
11th May 2015, 02:48
Well, I just only want to fix my issue. Enabling HTTPS in my Qt project, no matter what and how many process in Qt to enable this its fine, at least I've learn something.

wysota
11th May 2015, 05:59
Well, I just only want to fix my issue. Enabling HTTPS in my Qt project, no matter what and how many process in Qt to enable this its fine, at least I've learn something.

Rebuilding will not fix your issue. How did you come to a conclusion that the problem is in Qt itself? Do SSL examples bundled with Qt work or not?

ChrisW67
11th May 2015, 07:29
Well, I just only want to fix my issue. Enabling HTTPS in my Qt project, no matter what and how many process in Qt to enable this its fine, at least I've learn something.
The current pre-built distribution binaries from Qt.io are designed to use the OpenSSL libraries at run time if they are present (thereby supporting HTTPS) or fallback to no HTTPS support otherwise. If your system has compatible OpenSSL libraries installed in a default location then this should Just Work. I assume that is also true for the somewhat ancient version (Nokia vintage?) you are using.

Perhaps you could check what version of OpenSSL your system has installed and where.