Questions tagged [qsslsocket]

QSslSocket is an SSL-encrypted network socket class, from the Qt library

QSslSocket is a class in the library that provides a Secure Sockets Layer ()-encrypted network . It is part of the QtNetwork module and was introduced in Qt 4.3.

The most common way to use QSslSocket is to construct an object and start a secure connection by calling connectToHostEncrypted(). This method starts an immediate SSL handshake once the connection has been established.

See also

51 questions
1
vote
1 answer

Server crash when trying to access QSslSocket functions

So I am working on a very basic server/client thing in QTCreator. I am supposed to have the server send the certificate to the client when a client tries to connect. I have the following code in the server: void Dialog::createSocket() { …
DDauS
  • 105
  • 1
  • 2
  • 11
1
vote
0 answers

Possible reasons for QSSLSocket to stop sending/receiving data

Can anybody give me a possible reason why my QSSLSocket would stop sending and receiving data without firing a stateChanged or disconnected signal. My app starts a thread which connects to Facebooks XMPP server, authenticates and then goes into a…
user1379811
  • 203
  • 2
  • 10
1
vote
1 answer

QSslSocket::startServerEncryption fails with "PEM_READ_BIO_PRIVATEKEY:bad password read"

I've created an SSL server using the sample code from the Qt documentation. I then connect to it using QSslSocket::connectToHostEncrypted. The server fails, however, and this is in QSslSocket::errorString() Cannot provide a certificate with no key,…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
0
votes
1 answer

QSslSocket: build vs runtime versions

There is two versions of opelSsl in QT: QSslSocket::sslLibraryVersionString() QSslSocket::sslLibraryBuildVersionString() First one show runtime used library, second show build library version... Ok, but not clearly. So, witch library (built-in or…
0
votes
0 answers

Email not sending when using SMTP server on Qt 4

I've been making a desktop app using Qt 4 and C++. This is my code: maiwindow.cpp #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { …
Chayma
  • 3
  • 4
0
votes
0 answers

ERROR: could not establish encrypted connection , QT-SslServer

I start to study this code, but... There are some issues: CLIENT SIDE: ERROR: could not establish encrypted connection (The remote host closed the connection) SERVER SIDE: Now listening on 0.0.0.0:22333 New connection ERROR: could not receive…
0
votes
1 answer

QSSLSocket flush crashes

qint64 sent = socket->write (data, size); socket->flush (); This works fine with a QTcpSocket, but eventually crashes within a memcpy inside a QSSLSocket private event (flush). I know I should add more context, but that's a lot. Omitting…
charlie
  • 68
  • 2
  • 8
0
votes
0 answers

When does the platform does not support ssl? (QSslSocket::supportsSsl() returns false)

I am an qt app developer which uses https to connect to rest api. I deploy ssl dll libraries together with application (the same version as the qt was built with) but sometimes on windows it happens, that users report to me that the internet…
0
votes
0 answers

Qt Linux Mint 19.2 QSslSocket

I developed small Qt App for sending mails over smtp 465 port. It works on my developer linux mint 19.2 machine. When I deploy the app with all the libs to Mint 17.3 machine I get QAbstractSocketError::HostNotFoundError. I am using QSslSocket. If I…
Tom
  • 21
  • 3
0
votes
2 answers

Why am I getting runtime errors, with Sockets (TCP/Web) when moved to another thread? Is `QObject::moveToThread()` a synchronous call?

I am moving some sockets from main thread to worker thread and processing readyRead(), close(), write() etc. on the new thread. Rarely I see below dangerous warning: "QSocketNotifier: Socket notifiers cannot be enabled or disabled from another…
iammilind
  • 68,093
  • 33
  • 169
  • 336
0
votes
1 answer

What's the difference between using QWebSocket with a URL "wss://..." and QSslSocket in Qt?

New to Qt. I'm having trouble understanding the difference between using QWebSocket with a secure url, "wss://..." and QSslSocket. Which one of these is necessary to establish secure communication with a server in Qt? Or is something different…
0
votes
0 answers

Qt QSslSocket comodo positive ssl

I have a real bought comodo positive ssl certificate installed on apache and checked the correct installation through the site https://www.sslshopper.com/ssl-checker.html in the kit with the certificate is 5…
Jack H
  • 1
  • 1
  • 1
0
votes
1 answer

QSslSocket cannot resolve and Permission Denied error

The error messages are the following: qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method qt.network.ssl:…
user7392005
  • 117
  • 1
  • 8
0
votes
0 answers

QAbstractSocket::UnsupportedSocketOperationError with QSslSocket

QAbstractSocket throws UnsupportedSocketOperationError when connecting to a host over QSslSocket::connectToHostEncrypted(), Environnement: Qt 5.9.3 Ubuntu 16.04 (virtual machine) also Qt 5.9.3 Fedora 26 (native) _socket = new…
tbone
  • 23
  • 6
0
votes
2 answers

Compiling openssl with Qt MINGW for Android arm

I'm making an Android application in which I need to use SSL but it is causing problems like cannot call unresolved function EC_get_builtin_curves I searched for a solution to this problem and found out that I need to provide SSL library with the…
Farhan Haider
  • 1,244
  • 1
  • 13
  • 22