SSL Socket
The QtSslSocket component provides SSL encryption support for
QTcpSocket controlled network connections.
Please note: This component is deprecated; see the catalog.
SSL is a standard way to encrypt network connections. This component allows developers to use SSL together with the QTcpSocket class in Qt. It requires the 3rd party library OpenSSL.
The class works on top of QTcpSocket, encrypting data before it is sent to write() and decrypting it after if is received by read(). The interface is similar to that of QTcpSocket.
This Qt Solutions component is for Qt 4. For Qt 3 Solutions, please visit the Qt 3 Solutions Catalog.
Documentation:
Classes
Examples Guidelines
Tested on:
- Qt 4.2.1 / Windows XP / MSVC.NET 2003
- Qt 4.2.1 / Linux / gcc
- Qt 4.2.1 / MacOS X 10.4 / gcc
Unsupported platforms:
Only the tested platforms are supported, however the classes should be platform independent and are likely to work on the platforms supported by Qt.
Download Commercial Edition:
Only available for Qt Solutions license holder with a valid Support and Maintenance agreement (authentication required).
> <br>Changes:
- 2.5: Fixed atEnd(), so that it now accounts for QtSslSocket's internal buffer as well.
- 2.5: Fix bug in bytesAvailable(), which made it return wrong values with Qt 4.2.
- 2.4: Use the UTC timespec for dates in SSL certificates.
- 2.3: Make QtSslSocket reentrant.
- 2.3: Correct handling and deleting of the tcp socket. Sockets passed in through setSocket no longer get deleted.
- 2.3: Reset the SSL context between connections and upon destruction.
- 2.3: Fix error output.
- 2.2: Readded QtSslSocket::setSocket(), for STARTTLS support.
- 2.1: Refactored the implementation, and updated the API to better match Qt 4 style.
- 2.1: QFile::encodeName() is now used when passing the cert file and path to OpenSSL. This allows non-latin1 characters to be used in these paths.
- 2.1: Some warning messages were fixed, where the certificate and key file names were mixed up.
- 2.1: QtSslSocket::privateKey() now returns the key instead of the certificate.
- 2.1: QtSslSocket now emits bytesWritten().
- 2.0: Ported version 1.5 to Qt 4.

