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.
Related
I can implement HTTP using "win sockets" easily , but I've been struggling to implement HTTPS using "SChannel" which is pretty much poorly documented "at least for me". How can I establish a secure connection for HTTPS communication and is there any security or performance considerations I should be aware of?
SChannel integrated quite well with Windows and allows you to perform authentication without asking the user's credentials. Schannel works on a lower level than HTTP. It allows you to open secure tcp connections (ssl socket). You need to implement you own HTTP stack to send HTTPS requests or find a library. To get used to Schannel the best place to start is to understand Microsoft's samples which is a client-server example:
Client
Server
They are pretty simple examples but enough to understand the basics.
Curl has been using Schannel for a while and you can find some very useful code for your exercise https://github.com/curl/curl/blob/master/lib/vtls/schannel.c.
Security is a big topic and that's the purpose of Schannel. You will inherit the security risks of the operating system. Microsoft usually patches security issues quickly. If you are targeting Windows only, it is a good choice because of the deep integration to the Windows ecosystem. For example, you don't have to deploy your own ssl certificates like you do with openssl, Schannel will read the system certs automatically. You can also implement NTLM and Kerberos authentication easily without having to ask for credentials, Schannel will get a credentials handle from the user running your software. In general, it is pretty good library and as far as I know there is no performance penalty compared to other SSL libraries. It well tested and deployed to millions of machines around the world.
I am new to boost lib. I need a client program which will communicate with the server even in proxy environment also. I have tried with the poco lib,in that i got struck at creation of web socket after Handshake. After i am trying with this boost package and i have downloaded a sample chat client program from the boost examples.In that i don't know where to set proxy requirements. I searched in the all .cpp file inside the boost package. But i didn't understand any thing.
Can any body plz help me whether it is possible to do client communication in proxy environment with this.if it is possible tell me how.if not with this,please suggest any possible way.
Thanks,
vvk.
Boost Asio does not have proxy support.
I'd use libcurl for this myself. Libcurl has some integrations with Boost Asio floating around on github.
There's also CppNetlib which (undoubtedly) will have proxy support, and is integrated with Boost Library like Asio is (although it's not a part of the boost library distribution like Asio is).
Lastly, there's some hints on getting "manual" proxying started using just Boost Asio here:
how to add proxy support to boost::asio?
Although this will leave you implementing your own authentication too :/
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.
I wonder if there any available library which hides the OS-dependent LDAP client implementation details, like the idea for JDBC? and the library provides basic CRUD functionality also along with unified SSL API like what has been done in wldap32 in Windows.
Really appreciate!
I'm quite a newbie with Boost, and my only experience of surfing though a proxy using a library is using .NET (that is really convenient for that purpose). I'm now trying to perform a simple HTTP request through a HTTP proxy.
Is there a tidy way to do it using boost directly?
My proxy use a NTLM authentification.
No, Boost provides neither an HTTP client nor a way to interface with proxies. You would necessarily have to implement those features yourself.
To be clear, yes, it is possible to implement an HTTP client using Boost.Asio. But implementing a client that can reliably talk through a proxy is significantly more complex, and Asio does not provide any support for that beyond the low-level socket itself. It certainly does not include the framework for performing NTLM authentication, which may prove difficult to get right.
More complex libraries like cURL provide that support.