Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
4.4.0
-
None
Description
In QSslSocket documentation, \brief has the following sample:
void SslServer::incomingConnection(int socketDescriptor)
{
QSslSocket *serverSocket = new QSslSocket;
if (serverSocket->setSocketDescriptor(socketDescriptor))
else
{ delete serverSocket; }
}
It doesn't work like that however, it requires to set the Certificate and Private Key first.
The way the snippet is presented in the documentation, it just silently disconnects the client. It would also be useful to have a qWarning or qDebug somewhere that's stating that it's missing the certificate/private key.
It would also be useful to have a documentation on how to generate a self signed certificate/key.