Generate self-signed SSL certificate using Qt - c++

Is it possible for a Qt program to generate a self-signed SSL certificate and private key, i.e. the cacert.pem and privkey.pem files, using only Qt functions?
The program would be running on a Symbian phone (it's an FTPS server), so openssl command-line tools would not be available.

I've written an addon to Qt that will allow you to do this with a nice Qt-style API. It can be obtained here https://gitorious.org/qt-certificate-addon/ and the docs are online at http://xmelegance.org/devel/qt-certificate-addon/ it includes a couple of examples that should get you started.

Apperently there are some Qt classes that do this, starting from Qt version 5.14:
https://doc.qt.io/qt-5/qopcuax509certificatesigningrequest.html

It seems there are no classes that do this in Qt, so it is impossible to do with only Qt functions currently.

Related

does gSoapWinhttp plugin with gSoap supports linux

I'm using gSoap proxy services for ews and i need SSL and Auth. support for the endpoint. While my prefer platform is Linux. From gSoap documentation http://www.cs.fsu.edu/~engelen/soapdoc2.html found that it has all SSL and Auth. support in C for linux but i'm using C++.
So when i search on google for SSL and Auth. supports with gSoap in C++, i found https://code.google.com/p/gsoapwinhttp/ link for gsoapwinhttp.
gSoap documentation says that it support most of the platform like windows, linux, macOS etc. and gsoapwinhttp use windows library, so i'm bit of confusing does this gsoapwinhttp plugin with gsoap supports linux platform?
Any help appreciated. thank you.
UPDATE: http://markmail.org/message/sprfixg3gna7t57e#query:+page:1+mid:sprfixg3gna7t57e+state:results this link related to my question, but i don't understand what and how to do, (i'm newbie to C++).
gSoap has builtin support for SSL (gSoap SSL). Even though you are using C++, you can still use the C code and it will work fine. The services generated by soapcpp2 are inherited from struct soap so using the C functions like soap_ssl_server_context will still work.

gsoap 2.8.15 SSL Support

I'm attempting to write a gsoap client on Ubuntu 12.04 LTS using gsoap 2.8.15. From what I have read from another S.O. post (now which I cannot find), I'm supposed to make gsoap with the following command:
make secure
However, there appears to be no rule to make target 'secure'.
This appears to be the documented way to enable ssl support in gsoap. Does anybody have any tricks to make this work?
Ultimately, I need to run wsdl2h on a remotely hosted wsdl file over SSL to generate my client code. Thanks
If you're only interested in generating code with the WSDL, you can download it manually with cURL or wget (which will both likely already include SSL support). Once saved locally, wsdl2h can deal with the local file without a problem.
Obviously, you'll probably want to include SSL support when you're building your applications and linking gSOAP. For what it's worth, SSL is enabled by default if you're manually building gSOAP from source. You have to disable it with ./configure --disable-ssl.

What direction should I follow to add webservice functionalities to my application?

I have a problem, and I know there are many ways to solve it. I hope you can help me chose the fittest.
I am developping an application mainly using Matlab, and I try to gradually shift some of its functionalities to c++. I develop on windows, for windows.
I am quite experienced in these two programming languages, but I know nothing of web development.
I want to add some functionalities to this application that will use some webservices hosted on a server protected by ssl.
I am alone on this project, but I can spend some time learning new stuff if need be.
I would like to know what tools you think I should better use for this task ?
So far, I have tried and failed the following approach :
calling the webservice directly from Matlab. I have added the self-signed ssl certificate to every truststore I could find on my computer, but I keep getting an error telling me that the certificate is not valid.
calling the webservice using gSoap and c++. For this, I need to rebuild the gSoap binaries with ssl capabilities. I tried too do so using visual studio and mingw/gcc but did not succeed, and I could not find any help online.
I have the feeling after a few hours/days browsing and looking for solution that the tools I try to use are not the most used and therefore not the best documented (and therefore not the best suited for a rookie), so what is your advice?
I think using gSoap from your C++ modules would be the best choice.
Information about using gSoap with SSL as client is available here: Secure SOAP Clients with HTTPS/SSL
A link about using gSoap for building a VS Application: Creating a gSoap eBay Client Application with Visual C++ 2008
May be this helps for using gSoap with MinGW: Using gSoap in Qt/Windows

Qt, POP3 and SSL?

If Gmail is using SSL does this mean that I have to implement the algorithms for encrypting and decrypting all the traffic by myself in order to download the mail?
If so, is there a fast workaround for doing this ?
I should mention that I'm making a POP3 client from scratch in Qt Creator and I want to implement all the communication by myself.
You don't need to implement encryption algorithms by yourself.
Qt includes SSL support under QSsl namespace, which was introduced in Qt 4.3.
You should consider looking under QSsl namespace for required classes and enumerations.

Does a Qt application work in Google Native Client?

I'm not familiar with Qt or with Google Native Client. Is it possible for a TRIVIAL Qt console application to be ported to Google Native Client? I understand that some work would be involved. But the question is, how much if it's even possible?
A Qt developer has managed to get some Qt examples running under Native Client:
http://blog.qt.io/blog/2009/12/17/take-it-with-a-grain-of-salt/
Qt now has an official Native Client SDK:
http://qt-project.org/wiki/Qt_for_Google_Native_Client
Qt for Google Native Client Preview also updated here: http://qt-project.org/wiki/Qt_for_Google_Native_Client
Since you can't use system calls, you'd need to essentially port Qt to a new OS (ie, Native Client). This'll be a lot of work - good luck!
For those who are interested in using Qt with NaCl, I have made a Docker image containing Qt compiled with NaCl :
Link to Docker Image
You will just need to follow the instructions to get your application compiled.
There is also a video showing the process of compiling Qt with NaCl. At the end of this video, there is an example:
Link to video of Qt compiled with NaCl
Hope this help