PDA

View Full Version : Example of SSL communication



Morea
24th January 2009, 16:39
Hi. I'm giving up on the http communication and I'm now trying to use QSslSockets but again I lack short good example of code, for both server and client.
Does anyone know of such examples (or tutorial?)

wysota
25th January 2009, 11:03
Have you seen the examples that are in the Qt Reference Manual?

Morea
25th January 2009, 17:52
yes the code samples there I have seen, but not complete examples. Examples that shows all the handshaking etc.

For example, I have no idea on how to create the certificate either. I just need a simple one.

wysota
25th January 2009, 17:56
Examples that shows all the handshaking etc.
It's done more or less automatically with the exception of what's explained in QSslSocket::sslErrors()


For example, I have no idea on how to create the certificate either. I just need a simple one.

This is out of scope of using QSslSocket. If you want to use a certificate, you have to create it using regular means (i.e. using OpenSSL commands), it's not something that is done automatically and that's on purpose.

seim
25th January 2009, 23:41
try this: http://www.qtsoftware.com/products/appdev/add-on-products/catalog/4/Utilities/qtsslsocket

..but it is a little bit older and needs some work at.. QtSslSocket => QSslSocket etc.