Originally Posted by
wysota
I do not understand where should I set:
tcpServer->ignoreSslErrors();
QSslKey key(file, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, "server" );
tcpServer->setPrivateKey(key);
tcpServer->setLocalCertificate("server.csr");
tcpServer->ignoreSslErrors();
QFile *file = new QFile("server.key");
QSslKey key(file, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, "server" );
tcpServer->setPrivateKey(key);
tcpServer->setLocalCertificate("server.csr");
To copy to clipboard, switch view to plain text mode
where should I set and what for it is:
QSslSocket *serverSocket = new QSslSocket;
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
connect(serverSocket, SIGNAL(encrypted()), this, SLOT(zmien()));
serverSocket->startServerEncryption();
} else {
delete serverSocket;
}
QSslSocket *serverSocket = new QSslSocket;
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
connect(serverSocket, SIGNAL(encrypted()), this, SLOT(zmien()));
serverSocket->startServerEncryption();
} else {
delete serverSocket;
}
To copy to clipboard, switch view to plain text mode
Could someone write complete code? It will be faster to learn for me.
Bookmarks